A Louisville Metro Police officer walks outside the home of the gunman in the Camp Taylor neighbourhood in Louisville (Timothy D Easley/AP) Expand

Close

A Louisville Metro Police officer walks outside the home of the gunman in the Camp Taylor neighbourhood in Louisville (Timothy D Easley/AP)

A Louisville Metro Police officer walks outside the home of the gunman in the Camp Taylor neighbourhood in Louisville (Timothy D Easley/AP)

A Louisville Metro Police officer walks outside the home of the gunman in the Camp Taylor neighbourhood in Louisville (Timothy D Easley/AP)

The gunman who opened fire at a Louisville bank legally bought the weapon from a local dealership a week ago, police have said.

Louisville Metro Police Department chief Jacquelyn Gwinn-Villaroel said at a press conference that bank worker Connor Sturgeon, 25, bought the gun on April 4 and targeted certain people in the attack.

Armed with the rifle, Sturgeon killed five people — including a close friend of Kentucky’s governor — while live-streaming the attack on Instagram on Monday, authorities said.

Another eight people were hurt.

Ms Gwinn-Villaroel also said officers’ body camera video from the shooting will be released on Tuesday afternoon.

The chief said an officer who was shot in the head while responding to the mass shooting remained in a critical but stable condition on Tuesday morning.

“It’s looking hopeful,” she told WDRB-TV about Nickolas Wilt, who had graduated from training just 10 days earlier.

She said Mr Wilt and other officers “unflinchingly” engaged Sturgeon at Old National Bank and stopped him from killing more people.

Police arrived as shots were still being fired inside the building and killed Sturgeon, Ms Gwinn-Villaroel said.

“The act of heroism can’t be overstated,” she said.

“They did what they were called to do. They answered that call to protect and serve,” she said.

The shooting, the 15th mass killing in the US this year, comes just two weeks after a former pupil killed three children and three adults at a Christian school in Nashville, Tennessee, about 160 miles to the south.

That state’s governor and his wife also had friends killed.

Four of the injured remained in hospital on Tuesday — one in a critical condition and three in stable but fair conditions, the University of Louisville Hospital said in a statement.

Kentucky governor Andy Beshear said he lost one of his closest friends in the shooting.

“Tommy Elliott helped me build my law career, helped me become governor, gave me advice on being a good dad,” he said, his voice shaking with emotion.

“He’s one of the people I talked to most in the world and very rarely were we talking about my job. He was an incredible friend.”

Also killed in the shooting were Josh Barrick, Jim Tutt, Juliana Farmer and Deana Eckert, police said.

“There are no words to adequately describe the sadness and devastation that our Old National family is experiencing as we grieve the tragic loss of our team members and pray for the recovery of all those who were injured,” Old National Bank boss Jim Ryan said in a statement.

Louisville mayor Craig Greenberg told WDRB-TV his focus will be on trying to unify residents in the city.

“We can’t let the targeted acts of evil violence that we saw yesterday in our city deter us from continuing on the path to make our city the vibrant, safe, strong healthy city that we all know it can be and all want it to be,” he said.