SAN FRANCISCO (AP) — The man accused of attacking House Speaker Nancy Pelosi’s husband with a hammer told police he wanted to hold the Democratic leader hostage and “break her kneecaps” to show other members of Congress there were “consequences to actions,” authorities said Monday.

In a chilling federal complaint, officials say David DePape, 42, carrying zip ties, tape and a rope in a backpack, broke into the couple’s San Francisco home early Friday morning, went upstairs where 82-year-old Paul Pelosi was sleeping, and demanded to talk to “Nancy.”

“This house and the speaker herself were specifically targets,” San Francisco District Attorney Brooke Jenkins said at a Monday evening news conference announcing state charges against DePape, including attempted murder.

“This was politically motivated,” Jenkins said. She implored the public to “watch the words that we say and to turn down the volume of our political rhetoric.”

Investigators believe DePape had been researching in advance to target Pelosi, Jenkins said in an interview with The Associated Press.

“This was not something that he did at the spur of the moment,” she said.

In a statement late Monday, Speaker Pelosi said her family was “most grateful” for "thousands of messages conveying concern, prayers and warm wishes." Her husband underwent surgery for a fractured skull and other injuries after the attack. She said he was making “steady progress on what will be a long recovery process.”

The stark narrative laid out by state and federal prosecutors stands in contrast to the mocking jokes and conspiracy theories circulated by far-right figures and even some leading Republicans just a week before midterm elections. A record number of security threats are being reported against lawmakers and election officials.

At a campaign event Monday in Arizona, Kari Lake, the Republican candidate for governor, drew hearty laughs as she joked about security at the Pelosi home.

In addition to the state charges, DePape was also charged Monday in federal court with influencing, impeding or retaliating against a federal official by threatening or injuring a family member. He also faces one count of attempted kidnapping of a United States official because of their official duties.

No attorney has been listed for DePape. He is scheduled to be arraigned Tuesday on the state charges, and prosecutors will ask for him to be held in jail without bail.

Authorities said DePape smashed a glass door in the back of the home with a hammer, went to the upstairs bedroom and told a surprised Paul Pelosi to wake up.

When Paul Pelosi told the intruder his wife was not home, DePape said he would wait — even after being told she would not be home for some days. The assailant then started taking out twist ties to tie Pelosi up, the complaint says.

DePape told investigators he wanted to talk to Speaker Pelosi and viewed her as the “leader of the pack of lies told by the Democratic Party,” according to the eight-page complaint.

“If she were to tell DePape the ‘truth,’ he would let her go and if she ’lied,’ he was going to break her kneecaps,” the complaint alleges.

“By breaking Nancy’s kneecaps, she would then have to be wheeled into Congress, which would show other members of Congress there were consequences to actions,” the complaint says DePape told investigators.

The federal complaint says DePape said he wanted “to use Nancy to lure” another person, but it provides no details of such a plan.

After DePape confronted Paul Pelosi in his bedroom, Pelosi tried to make it to an elevator in the home to reach a phone, but DePape blocked his way, Jenkins said. In a nightshirt, Pelosi then told the assailant he had to use the restroom, allowing him to get to his cellphone and call 911, according to authorities.

Police were dispatched to the home in the upscale Pacific Heights neighborhood around 2:20 a.m. Friday. They arrived two minutes later to see the two men struggling over a hammer, and then DePape struck Pelosi at least once before being tackled by officers, Jenkins said.

She said police body camera footage “shows the attack itself." Police later found a second hammer, along with rope, tape and a diary in DePape's backpack.

In the ambulance to the hospital, Paul Pelosi told police he had never seen DePape before, the complaint said. And Jenkins said Sunday, “We have nothing to suggest that these two men knew each other prior to this incident," a statement contradicting vulgar unsupported suggestions on social media.

DePape told investigators he didn’t leave even though he knew Paul Pelosi had called 911 because “much like the American founding fathers with the British, he was fighting against tyranny without the option of surrender,” the affidavit said.

Speaker Pelosi, who was in Washington, D.C., at the time of the attack, returned swiftly to California. Unlike presidents, congressional leaders have security protection for themselves, but not their families.

DePape is a Canadian citizen who legally entered the United States in 2000 but has stayed long after his visa expired, according to a U.S. official who was not authorized to discuss the matter publicly and spoke on condition of anonymity.

Family described DePape as estranged, and he was known by some in San Francisco as a pro-nudity activist who appeared to embrace a range of conspiracy theories. DePape has lived for the past two years in a garage at a residence in Richmond, California, the complaint said.

The attack was an unsettling echo of the Jan. 6, 2021, insurrection at the U.S. Capitol, when rioters trying to overturn Joe Biden’s election defeat of Donald Trump stormed the halls eerily calling “Where’s Nancy?” Some carried zip ties.

Elon Musk over the weekend tweeted, then deleted, a fringe website’s conspiracy theories to his millions of followers, as his purchase of Twitter has raised concerns that the social media platform would no longer seek to limit misinformation and hate speech.

Trump’s son, Donald Trump Jr., was among those making light of the attack on Paul Pelosi, tweeting crude jokes about it.

With nearly 10,000 threats against members of Congress in the last year, U.S. Capitol Police have advised lawmakers to take precautions. Chief Tom Manger, who leads the force, has said the threat from lone-wolf attackers has been growing and the most significant threat the force is facing is the historically high number of threats against lawmakers, thousands more than just a few years before.

The beating of the speaker’s husband follows other attacks and threats. This summer, a man carrying a gun, a knife and zip ties was arrested near Supreme Court Justice Brett Kavanaugh’s house in Maryland after threatening to kill him. In 2017, Republican Rep. Steve Scalise was seriously injured when a Bernie Sanders supporter opened fire on Republicans at a congressional baseball game practice.

___

Mascaro reported from Washington and Dazio reported from Los Angeles. Associated Press writers Michael Balsamo in Washington and Elliot Spagat in San Diego contributed to this report.