Paul Pelosi, 82, was taken to a San Francisco hospital where he underwent surgery to repair a skull fracture and severe injuries to his right arm and hands, a spokesperson for the House speaker said in a statement, adding that a full recovery was expected.
The man arrested at the scene, David Depape, 42, will be charged with attempted homicide, assault with a deadly weapon, elder abuse, burglary, and several other felony charges, San Francisco Police Chief William Scott said.
The Democratic speaker of the U.S. House of Representatives, who is second in the constitutional line of succession to the U.S. presidency, was in Washington with her protective detail at the time of the assault, according to the U.S. Capitol Police.
Authorities were still investigating a motive for the predawn attack, which was witnessed and interrupted by police officers dispatched to the Pelosi home for an "A-priority wellbeing check," Scott told reporters.
CNN reported that Paul Pelosi had called emergency-911 and spoke in "code," not saying directly that he was under attack but leading the dispatcher to the conclusion that something was wrong.
The intruder shouted, "Where is Nancy?" before attacking her husband, CNN and The Washington Post both reported, citing unnamed sources.
A statement from Nancy Pelosi's spokesperson, Drew Hammill, said her husband had been attacked "by an assailant who acted with force, and threatened his life while demanding to see the Speaker."
Little was immediately known about the suspect.
In recent posts on several websites, an internet user named "daviddepape" expressed support for former President Donald Trump and embraced the cult-like conspiracy theory QAnon. The posts include references to "satanic paedophilia," anti-Semitic tropes and criticism of women, transgender people and censorship by tech companies.
Older messages promote quartz crystals and hemp bracelets. Reuters could not confirm that the posts were created by the man arrested on Friday.
It was unclear how the intruder got into the three-story red brick townhouse in the affluent Pacific Heights neighborhood. Aerial photos showed shattered glass on a door at the rear of the house.
Streets around the residence were closed off following the attack, which occurred less than two weeks before midterm elections in which control of the House and U.S. Senate is at stake.
Scott said police were called to the house at 2:27 a.m. Pacific time (0927 GMT), where they encountered Depape and Paul Pelosi struggling over a hammer, before Depape pulled the hammer away and attacked Pelosi.
Police officers tackled, disarmed and arrested Depape and took both men to a hospital for treatment, Scott said at a press briefing. He declined to answer questions, and said police would provide more details later.
President Joe Biden called Pelosi to express his support, according to White House spokesperson Karine Jean-Pierre.
House Republican Leader Kevin McCarthy also said he reached out to Pelosi, while Senate Republican Leader Mitch McConnell said he was "horrified and disgusted" by the attack.
The Capitol Police, responsible for protecting Congress, said it was working with the FBI and San Francisco police on the investigation.
New York City police warned on Thursday that extremists could target politicians, political events and polling sites ahead of the midterm elections.
Republicans have been campaigning on concerns about violent crime, as well as inflation and other quality-of-life issues. San Francisco's crime rate in 2021 was 1.5 times the national average, according to several crime-tracking websites.
As a Democratic leader in Washington and a longtime representative from one of America's most liberal cities, Pelosi, 82, is a frequent target of Republican criticism and is often featured in attack ads.
Her office was ransacked during the Jan. 6, 2021, attack on the U.S. Capitol by supporters of Republican then-President Donald Trump, some of whom hunted for her during the assault.
In January 2021, her home was vandalized with graffiti messages saying "Cancel rent" and "We want everything" painted on the house and a pig's head left in front of the garage, according to media reports.
McConnell's home also was vandalized around that time.
Representative Adam Kinzinger, one of two Republicans on the House panel investigating the Jan. 6 attack, condemned the rise of incendiary campaign rhetoric vilifying political opponents and promoting falsehoods about widespread voter fraud.
"When you convince people that politicians are rigging elections, drink babies blood, etc, you will get violence. This must be rejected," he wrote on Twitter, calling on Republican candidates and elected officials to "speak out, and now."
In a politically polarized climate, threats against Republican and Democratic lawmakers have been on the rise. Capitol Police said they investigated 9,625 incidents in 2021, nearly a threefold increase from 2017.
A gunman angered by Trump shot and wounded five Republican members of Congress at a baseball practice in 2017, and Democrat Gabby Giffords was shot in the head at a public appearance in 2011.
Paul Pelosi, who owns a San Francisco-based real estate and venture capital firm, was convicted of a misdemeanor charge of driving under the influence of alcohol after becoming involved in an auto accident in May. He was sentenced to five days in jail in Napa County, California, but his term was offset by community service and credit given for time already served immediately following his arrest.