Media playback is unsupported on your device Media caption Kansas shooting 'hero' counted the gunman's shots

Police are investigating whether the fatal shooting of a man in the US state of Kansas was racially motivated.

Three men were wounded in the shooting at a crowded bar in Olathe on Wednesday night and one of them later died.

A barman told local media a man used racial slurs before opening fire. Two of the victims, including the deceased, are Indian.

Adam Purinton, 51, has been charged with premeditated first-degree murder and the FBI is investigating a motive.

Srinivas Kuchibhotla, 32, died while his friend Alok Madasani, 32, remains in hospital in a stable condition.

Image copyright Facebook Image caption From left: Srinivas Kuchibhotla, who died; Alok Madasani, who was injured; and Ian Grillot, also injured

The two men were engineers at US technology company Garmin and studied in India, according to their social media profiles.

The other injured man, Ian Grillot, 24, had apparently intervened to stop the violence, according to witnesses.

Speaking from his hospital bed to local TV News channel KMBC, he brushed aside suggestions that he was a hero.

"I was just doing what anyone should have done for another human being," he said. "It's not about where he's from or his ethnicity.

"We're all humans. So I just felt I did what was naturally right to do."

Mr Purinton is accused of shooting customers at Austin's Bar and Grill as they watched the University of Kansas basketball team play on television.

Image copyright AP Image caption Adam Purinton was arrested five hours after the shooting

A bystander told the Kansas City Star that just before opening fire the gunman shouted: "Get out of my country."

The suspect allegedly fled on foot and was arrested five hours later at an Applebee's restaurant just over the state border, 80 miles (130km) away in Clinton, Missouri.

The Kansas City Star reported that he told a staff member at the dining chain he needed a place to hide because he had killed two Middle Eastern men.

A barman there tipped off police that he had a customer who had admitted shooting two men and the officers arrived to detain the suspect.

Olathe Police Chief Steve Menke declined to comment on the reports of racial abuse but said his force was working with the FBI "to investigate any and all aspects of this horrific crime".

Image copyright Austins Bar & Grill Image caption Austins Bar & Grill in Olathe

The killing dominated news bulletins in India and social media, where some blamed Donald Trump's presidency.

Siddharth, an Indian actor who uses one name, tweeted to his 2.6 million followers: "Don't be shocked! Be angry! Trump is spreading hate. This is a hate crime! RIP #SrinivasKuchibhotla."

Mr Madasani's father, Jaganmohan Reddy, also called it a hate crime, adding that such incidents had increased in number following Mr Trump's election.

Mr Kuchibhotla was from the Indian city of Hyderabad. His parents, Madhusudhan Rao and Vardhini Rao, were too stunned by news of his death to comment, the Associated Press reported.

The Indian external affairs ministry said two Indian consulate officials from Houston and Dallas have been sent to Kansas City to meet Mr Madasani and arrange the repatriation of Mr Kuchibhotla's body.

The US Embassy in New Delhi decried the shooting.

"The United States is a nation of immigrants and welcomes people from across the world to visit, work, study, and live," said Charge d'Affaires MaryKay Carlson.

"US authorities will investigate thoroughly and prosecute the case, though we recognise that justice is small consolation to families in grief."