A white man has been charged with federal hate crimes after the killing of two African-Americans at a grocery shop last month in Kentucky.

A federal grand jury in Louisville returned three hate crime charges against 51-year-old Gregory Bush on Thursday.

US attorney Russell Coleman said Bush was charged with killing two people based on their race and attempting to kill a third person based on his race. Bush was also charged with three firearms offences.

Police said Bush walked into a Kroger grocery shop with a .40-calibre handgun on October 24 and shot one person, and then killed another in the car park before exchanging fire with an armed man before fleeing.

Coleman said there has been a “spectre that reared its head and laid across this community” since the shootings.

“This is not acceptable,” Coleman said at a news conference Thursday.

“No Kentuckian should be frightened to go shopping, no Kentuckian should be frightened to go worship, no Kentuckian should be frightened to go to school.”

Coleman said the FBI has been involved in investigating the shooting since the day it happened.

Bush has pleaded not guilty to murder and other charges in state court, and is being held on bail.

Prosecutors have not made a decision on seeking the death penalty.

Bush had stopped at a black church in suburban Louisville before heading to the supermarket, where 69-year-old Maurice Stallard and 67-year-old Vicki Lee Jones were shot at close range.

Bush was seen on surveillance video trying to enter the church, but the door was locked and he left.

The pastor of that church, Kevin Nelson, said his flock was simply hoping “to see justice be done”.

“We have to learn how to get along with each other and generally accept each other’s differences,” he said.

Sadiqa Reynolds, president of Louisville’s Urban League, said “we cannot live in a community with hate, and there must be severe consequences for that”.

“Racism is real and we see that our country is very, very divided,” Reynolds said. “That is not going to go away.”