Paul Pelosi (right), the husband of House Speaker Nancy Pelosi, was attacked at the couple's home in San Francisco early on October 28. Pelosi is pictured here in Washington, DC, on March 17. (AP Photo/Andrew Harnik, File)

(CNN) — The man who assaulted Paul Pelosi, the husband of House Speaker Nancy Pelosi, tried to tie him up “until Nancy got home,” according to two sources familiar with the situation. When the police arrived, the assailant was saying he was “waiting for Nancy.”

Paul Pelosi was attacked with a hammer at the couple’s home in San Francisco by a male assailant early Friday morning, law enforcement sources told CNN. The assailant who attacked Paul Pelosi was searching for the speaker of the House, according to a source briefed on the attack. The intruder confronted the speaker’s husband in their San Francisco home shouting, “Where is Nancy? Where is Nancy?” according to the source.

Pelosi, 82, was hospitalized but is expected to make a full recovery, the Democratic speaker’s office said in a statement. Pelosi was taken into surgery this morning, according two sources familiar with the situation. His doctors have told the family that he is expected to make a full recovery, the sources said.

Speaker Pelosi was able to speak to her husband after the attack and before he was taken into surgery, according to a source familiar with the matter.

Paul Pelosi was having surgery for injuries to his head, the source said but did not offer more details on the treatment.

Speaker Pelosi is flying back to San Francisco with her family to be with her husband, according to a source familiar told CNN on Friday afternoon.

The attack sent shock waves through Washington and sparked an outpouring of condolences and condemnation from congressional leaders on both sides of the aisle. It comes as fears of political violence directed toward lawmakers remain high in the wake of the January 6, 2021, attack on the US Capitol as well as other high-profile violent incidents that have targeted members of Congress in recent years.

Drew Hammill, a spokesman for Nancy Pelosi, said the assailant is in custody and a motive is being investigated. The speaker was in Washington at the time of the attack, a spokesperson said.

“The Speaker and her family are grateful to the first responders and medical professionals involved, and request privacy at this time,” Hammill said in his statement.

At a news conference, Chief William Scott of the San Francisco Police Department identified 42-year-old David DePape as the suspect and provided a description of what responding law enforcement officers witnessed when they arrived at the scene.

When officers arrived at the residence, Scott said, they encountered “an adult male and Mr. Pelosi’s husband, Paul.” Scott went on to say that, “the suspect pulled a hammer away from Mr. Pelosi and violently assaulted him with it. Our officers immediately tackled the suspect, disarmed him, took him into custody, requested emergency backup and rendered medical aid. The suspect has been identified as 42-year old David DePape.”

Scott said that a motive is still being determined.

Paul Pelosi was able to call 911 at the start of the attack, according to a law enforcement source and another source familiar with the matter.

Pelosi managed to keep the line open and the dispatcher could hear a conversation in the background, according to the law enforcement source.

Pelosi was talking in code, said the law enforcement source, providing enough detail so that the operator overhearing it could understand that there was something wrong. At the same time, Pelosi seemed to be trying not to make it obvious to the intruder that he had an open line, the source described.

The source said the dispatcher could hear Pelosi speaking about what was going on and dispatched police to check on the house.

The struggle with Pelosi was captured on a police body-camera as police came through the door to intervene, according to one of the sources.

The man who allegedly attacked Paul Pelosi early Friday posted memes and conspiracy theories on Facebook about Covid vaccines, the 2020 election and the January 6 attack, and an acquaintance told CNN that he seemed “out of touch with reality.”

The US Capitol Police said in a statement earlier in the morning that they are assisting the FBI and the San Francisco Police “with a joint investigation” into the break-in at the Pelosi residence in California.

The assailant entered the Pelosi residence through the back of the house, according two sources familiar with the early details of the incident.

With Speaker Pelosi away, there would not have been a security detail at the residence, according to one source familiar with protocol.

There may be video that US Capitol Police and law enforcement can review as there are security cameras at the home, according to two law enforcement sources.

President Joe Biden spoke with Speaker Pelosi, the White House said.

“The President is praying for Paul Pelosi and for Speaker Pelosi’s whole family. This morning he called Speaker Pelosi to express his support after this horrible attack,” press secretary Karine Jean-Pierre said in a statement.

She continued: “He is also very glad that a full recovery is expected. The President continues to condemn all violence, and asks that the family’s desire for privacy be respected.”

Senate GOP Leader Mitch McConnell said in a tweet on Friday he is “horrified and disgusted” by the reports that Pelosi was assaulted in his home.

“Grateful to hear that Paul is on track to make a full recovery and that law enforcement including our stellar Capitol Police are on the case,” the Kentucky Republican said.

House GOP Leader Kevin McCarthy reached out to Speaker Pelosi after the attack, according to McCarthy’s office.

“Leader McCarthy reached out to the Speaker to check in on Paul and said he’s praying for a full recovery and is thankful they caught the assailant,” said Mark Bednar, a spokesman for McCarthy.

The Pelosis have been married since 1963 and have five children.