Paul Pelosi, the husband of House Speaker Nancy Pelosi, was “violently assaulted” after a break-in at the couple’s San Francisco home early on Friday, her office said in a statement.

“The assailant is in custody and the motivation for the attack is under investigation,” the statement said. “Mr. Pelosi was taken to the hospital, where he is receiving excellent medical care and is expected to make a full recovery.”

The Democratic speaker of the US House of Representatives, who is second in line to the presidency, was in Washington with her protective detail at the time of the assault, according to the US Capitol Police.

The circumstances of the attack were unclear, including how the intruder got into the home.

A San Francisco Police Department spokesperson and a spokesperson for Nancy Pelosi did not immediately respond to requests for comment.

The Capitol Police, responsible for protecting Congress, said it is working with the FBI and the San Francisco Police on the investigation.

The assault comes less than two weeks before the November 8 midterm elections, in which control of the House and the Senate is at stake. Republicans have been campaigning on concerns about violent crime, as well as inflation and other quality-of-life issues.

As a Democratic leader in Washington and a longtime representative from one of America’s most liberal cities, Pelosi is a frequent target for Republican criticism and is often featured in attack ads. Her office was ransacked during the January 6, 2021 attack on the US Capitol by supporters of Republican then-President Donald Trump, some of whom hunted for her during the assault.

In January 2021, her home was vandalised with graffiti 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.

In a politically polarised climate, Republican and Democratic lawmakers have reported receiving death threats and other harassment. 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, 82, 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.