The fatal shootings of two African-Americans at a grocery store near Louisville, Kentucky are being investigated as a possible federal hate crime, US officials say.

Gregory Bush, 51, has been charged with two counts of murder and 10 of wanton endangerment over Wednesday's incident.

Police say he opened fire on both victims at a Kroger grocery store on the outskirts of Jeffersontown city.

Officials say he also tried to enter a black church shortly before.

Police Chief Sam Rogers said it was too early to confirm if the shooting was racially motivated - but confirmed reports Mr Bush was seen on security cameras attempting to enter the Jeffersontown First Baptist Church about 10-15 minutes before the shooting at the Kroger store.

The church has a large African-American membership,

The two victims of the shooting have been named as 69-year-old Maurice Stallard and Vickie Lee Jones, 67.

Mr Stallard was shot multiple times inside the Kroger shop, which he had been visiting with his 12-year-old grandson.

A witness told a local Fox affiliate he had shielded the child, who was uninjured in the shooting, after he ran away shouting for help after witnessing the attack.

Ms Jones was then gunned down in the car park outside the supermarket.

One witness, Ed Harrell, exchanged gunfire with the suspect outside, but he fled and was apprehended by officers minutes later.

Mr Harrell told the local Courier Journal newspaper he confronted the gunman outside, who told him: "Don't shoot me. I won't shoot you. Whites don't shoot whites."

Police have not confirmed the statement, but the FBI confirmed it is investigating the shooting alongside local authorities.

US District Attorney Russell Coleman in Louisville said Friday that they were looking into potential violations of federal law "which includes potential civil rights violations such as hate crimes."

In his statement, he said the shootings "are not being taken lightly by the United States government."

Bush has a criminal record of violent behaviour and a recorded history of mental illness, local media say.

He had previously been temporarily banned from possessing firearms by a judge, the Associated Press reports.

Louisville Mayor Greg Fischer said he was "sick and heartbroken and quite angry" over the attack.

"We are one city - one proudly diverse and welcoming city - and we have one shared future," he told a news conference on Thursday.

"Our city and our future have no room for anyone who looks at their fellow human beings with hate or discrimination," he added.