A Kansas man pleaded guilty Tuesday to opening fire in a bar last year, killing one Indian man and injuring two other people in a crime that sparked international outrage and federal hate crime charges.

Adam W. Purinton, 52, pleaded guilty to one count of premeditated first-degree murder and two counts of attempted premeditated first-degree murder in connection with the shooting at Austin’s Bar and Grill in Olathe, Kansas, in February of last year, according to Johnson County District Attorney Steve Howe. He will be sentenced in May, and is likely to spend the rest of his life in prison under a plea agreement.

Purinton was “distraught” and “drinking pretty fast” before he was kicked out of the bar the night of the shooting, witnesses told The Washington Post on the night of the crime. He barged back in, hurling racial slurs and shouting, “Get out of my country!” at two Indian men before firing shots, witnesses recalled. Purinton, it turned out, thought the men were Iranian.

One of the Indian men shot – Srinivas Kuchibhotla, 32 – died in the hospital, police said. Alok Madasani, 32, was released from the hospital a day later. Both of the men worked for Garmin, the Olathe-based technology firm. A third man, Ian Grillot, was wounded when he tried to intervene. He was later hailed as a hero for his efforts.

A federal grand jury in June also indicted Purinton on two hate crime charges for killing Kuchibhotla and attempting to kill Madasani. The indictment states that Purinton “intentionally and specifically engaged in an act of violence, knowing that the act created a grave risk of death to a person.”

Purinton pleaded not guilty in November to the federal hate crime charges, which are separate from Tuesday’s plea agreement. The hate crime charges carry a possible death sentence because one involves a killing, but the Justice Department has not said whether it will seek the death sentence.

The shooting, which took place just over a month after President Trump’s inauguration, sent waves of fear rippling through immigrant communities, particularly those from India. Family members of the Indian men shot said they worried the United States was no longer a safe place for Indians. The father of one of the injured men even urged parents in India not to send their children to the United States. “The situation seems to be pretty bad after Trump took over as the U.S. president,” he said at the time.

Trump initially faced criticism for not speaking out against the shooting. He later addressed it in a speech to Congress.

Purinton grew up in Kansas suburbia, and was described by the Kansas City Star as a Navy veteran and former air traffic controller. In recent years, he moved from one low-level job to another, and neighbors recalled that he was frequently drunk. He appeared deeply bothered by the death of his father in 2015, the Kansas City Star reported.

Kuchibhotla, the man Purinton fatally shot, grew up in the south Indian city of Hyderabad and came to the United States to study engineering at the University of Texas at El Paso. He got married, bought a house, and planned to start a family in Kansas, his wife said in a news conference days after the shooting.

His family warned him about the dangers of staying in the United States, and his wife said she encouraged him to consider going back to India. But Kuchibhotla, his wife said, refused to abandon “the country he loved.”

“The life Srinu and I had together, the plans we made, the family we hoped to build here, all vanished in a moment of senseless anti-immigrant rage,” his wife, Sunayana Dumala, wrote in a January commentary in the Kansas City Star.

Dumala was not sure she would be able to return to the United States, in part because her immigration status depended on her husband’s. “And I didn’t know if I’d want to,” she said.

But with the help of immigration lawyers, she returned.

“I returned for all the love that flowed around me after this terrible tragedy. For all the people, near and far, who went out of their way to show me America cannot and must not be judged by the actions of one man,” Dumala wrote. “I returned because America is my home now.”

Dumala was not in court Tuesday, but released a statement saying the plea “will not bring back my Srinu, but it will send a strong message that hate is never acceptable.

She planned to attend a memorial walk in Kuchibhotla’s honor on Friday, which would have been his 34th birthday.

“We must understand and love one another,” Dumala wrote in her statement. “Let us continue to work for peace, understanding and love – the things Srinu stood for and will be his legacy.”

Parikh Worldwide Media is the largest Indian-American publishing group in the United States. The group publishes five periodicals – “News India Times,” a national weekly newspaper; “Desi Talk in New York,” a weekly newspaper serving the New York-New Jersey-Connecticut region; and “Desi Talk in Chicago,” a weekly newspaper serving the Greater Chicago area and the Midwestern states; and “The Indian American,” a national online quarterly feature magazine, and the Gujarat Times, a Gujarati language weekly. The combined circulation and readership of these publications make the media group the most influential in the ethnic Indian market.