A gunman opened fire at a bank in downtown Louisville on Monday, killing at least four people — including a close friend of Kentucky Gov. Andy Beshear — and injuring nine others, authorities said.

The gunman was identified as Connor Sturgeon, 23, who police said was an employee of Old National Bank on East Main Street, where the gunfire erupted at about 8:38 a.m.

Parts of the attack were livestreamed, police said.

Responding officers arrived in three minutes, exchanged gunfire with the gunman and killed him, interim Police Chief Jacquelyn Gwinn-Villaroel told reporters.

“The suspect shot at officers. We then returned fire and stopped that threat,” she said. “The suspect is deceased.”

Gwinn-Villaroel also confirmed that some of the deadly attack was shown live on social media by the shooter.

“The suspect was livestreaming, and unfortunately that’s tragic to know that that incident was out there and captured,” she said. “And so we’re hopeful that we can have that incident removed.”

The four killed were identified as: Tommy Elliott, 63; Juliana Farmer, 45; Jim Tutt, 64; and Josh Barrick, 40.

An emotional Beshear said he spoke regularly to Elliott and mourned his passing.

“Today I’m hurting and I know so many people are as well.  We lost four children of God,” Beshear said.

“Tommy Elliott helped me build my law career, helped me become governor, gave my advice on being a good dad. He’s one of the people I talked to most in the word and very rarely were we talking about my job. He was an incredible friend.”

Officer Nickolas Wilt, 26, was shot in the head, underwent surgery and was listed in critical condition, Gwinn-Villaroel said. Wilt had graduated from the police academy on March 31.

“I just swore him in and his family was there to witness his journey to become a police officer,” Gwinn-Villaroel said.