The man who shot Indian software engineer Srinivas Kuchibhotla after shouting "get out of my country" has admitted in a US state court to the murder.

Adam Purinton also admitted in the Kansas court on Tuesday that he attempted to murder Alok Madasani and Ian Grillot, the American who tried to defend the two Indians during the attack at a sports bar in Olathe in February 2017.

Since he has admitted to the killing and the attacks, a full trial will not be held, sparing the victims and their families the agony of reliving the incident in court testimonies. 

Purinton is scheduled to be sentenced on May 4.

However, Purinton, who is white, has also been charged separately in a federal court with hate crime murder by federal prosecutors, who allege that he targeted Kuchibhotla and Madasani because of their race, ethnicity or national origin.

KCUR radio station reported that in a filing in February, the federal judge told the federal Attorney General Jeff Sessions to decide within 90 days whether to seek the death penalty for Purinton in that case.

In the state court on Tuesday, the 52-year-old ex-navy man agreed to the maximum sentence for each of three charges - premeditated murder, and two attempted murders.

KCUR said that Judge Charles Droege explained to Purinton that by admitting his guilt, he would face life in prison for the murder as well as a minimum of 146 months or a maximum of over 50 years in prison for the attempted murders.

Purinton told the judge he understood the consequences, the radio reported.

In a court appearance in November 2017, he denied the charges, setting the stage for the trial, but has now changed his mind.

Kuchibhotla's wife Sunayana Dumala did not attend the court on Tuesday but instead sent a statement: "Today's guilty verdict in the murder of my husband will not bring back my Srinu, but it will send a strong message that hate is never acceptable. We must understand and love one another."

She is organising a peace walk to honour Kuchibhotla on his birthday on Friday, according to KCUR.

On February 22, 2017, Purinton taunted Kuchibhotla and Madasani at the bar about their immigration.

After he was removed from the bar, he returned with a gun and shot them eight times, killing Kuchibhotla and injuring Madasani. He then shot Grillot, who intervened.

Purinton then drove to Clinton in Missouri state where he told a bartender at a restaurant that he had shot "Iranian people".

The bartender called the police who arrested Purinton.