Former President Barack Obama commented on the attack against Paul Pelosi, the husband of House Speaker Nancy Pelosi, during a speech on Saturday in Michigan, saying that elected officials need to do "more" to reject dangerous rhetoric.

Obama made the comments after Paul Pelosi was violently attacked early Friday morning in the couple's San Francisco home. San Francisco Police Chief William Scott said David DePape, 42, hit Paul Pelosi at least once with a hammer. 

When officers arrived at the Pelosi's residence, Scott said that both Paul Pelosi and DePape were struggling over the hammer. Officers demanded the men drop the hammer, according to Scott, and DePape began attacking Paul Pelosi.

Paul Pelosi was sent to a local hospital, where he underwent surgery to repair a skull fracture as well as other injuries, according to a spokesperson for Speaker Nancy Pelosi. He is expected to make a full recovery.

BIDEN CALLS PAUL PELOSI ATTACK 'DESPICABLE': 'ENOUGH IS ENOUGH'

Barack Obama interrupted by man during Michigan campaign speech

Former President Barack Obama reacts to being interrupted by a man during a Saturday rally in Michigan. (Pool Video)

Obama reacted to the attack during a campaign event for the Michigan Democratic Governor Gretchen Whitmer.

"But here's one thing that we can feel, we know, if our rhetoric about each other gets that mean. When we don't just disagree with people, but we start demonizing them, making wild, crazy allegations about them. That creates a dangerous climate. And if elected officials don't do more to explicitly reject that kind of rhetoric, if they tacitly support it or encourage their supporters to stand up inside voting places armed with guns and dressed in tactical gear, more people can get hurt," Obama said.

"And we're going to be violating the basic spirit of this country," he added. 

NANCY PELOSI'S HUSBAND PAUL PELOSI ATTACKED BY SUSPECT DAVID DEPAPE, WHO SHOUTED 'WHERE IS NANCY?': SOURCE

David DePape

(Left) Paul Pelosi and Nancy Pelosi attend the Pre-GRAMMY Gala. (Right) David DePape (Michael Short/ San Francisco Chronicle )

Obama was then interrupted by a man in the crowd.

"Sir, this is what I'm saying," Obama said, responding to the heckler. "We've got a process that we set up in our democracy."

Paul Pelosi and Nancy Pelosi's home seen from above after violent assault

The San Francisco home of House Speaker Nancy Pelosi and Paul Pelosi is seen after police say David Depape violently assaulted Paul Pelosi early Friday, Oct. 28, 2022. (KGO-TV)

President Biden also commented on the attack during a speech on Friday night in Philadelphia, Pennsylvania, calling it "despicable."

CLICK HERE TO GET THE FOX NEWS APP 

paul pelosi attack hammer nancy pelosi home break-in home invasion

Paul Pelosi, the husband of House Speaker Nancy Pelosi, was severely beaten by an attacker who broke into their San Francisco home in the early moning of Friday, October 28th, 2022. Paul Pelosi, 82, was taken to the hospital and is being treated by doctors for injuries after he was beaten with a hammer (Fox News)

"There's no place in America. There's too much violence, political violence, too much hatred, too much vitriol," Biden said. "And what makes us think that one party can talk about stolen elections? COVID being a hoax? It's all a bunch of lies."

Fox News' Timothy Nerozzi contributed to this report.