OLATHE, Kan. -- A Kansas man who opened fire last year in a suburban Kansas City bar, killing an immigrant from India in what federal prosecutors have called a hate crime, was sentenced Friday to life in prison. Adam Purinton, 52, was sentenced for premeditated first-degree murder in the Feb. 22, 2017, death of Srinivas Kuchibhotla.

The shooting stirred fears that immigrants were facing more violence after President Trump's election. It also attracted international attention, especially in India, where officials publicly wondered if their citizens were safe in the U.S.

Witnesses said Purinton, who is white, uttered racial slurs at Kuchibhotla and his friend, Alok Madasani, both 32, as they enjoyed an after-work drink at Austin's Bar and Grill in Olathe, Kansas. He was asked to leave but eventually returned and yelled "Get out of my country!" before firing at the men. A third man, Ian Grillot, was wounded when he tried to intervene.

Get Breaking News Delivered to Your Inbox

Under terms of a plea agreement, District Judge Charles Droege sentenced Purinton to the maximum sentence on each of the three charges, and ordered them to run consecutively. Purinton was given two sentences of about 14 years for wounding the two men and wouldn't be eligible for parole for 77.5 years, the Kansas City Star reported.

People gather near a photograph of Srinivas Kuchibhotla, the 32-year-old Indian engineer killed at a bar Olathe, Kansas, during a peace vigil in Bellevue, Washington on March 5, 2017. Jason Redmond / AFP/Getty

"Our goal is to make sure that he never walks in the community again, that he spends the rest of his life in the penitentiary, and I believe this sentence will achieve that result," Johnson County D.A. Steve Howe said Friday, according to the Kansas City Star.

Kuchibhotla and Madasani immigrated to the U.S. as students and were working as engineers at GPS-maker Garmin at the time of the shooting. Madasani told detectives that the gunman asked the men if their "status was legal" before he opened fire, according to a court affidavit.

Purinton still faces federal hate crime charges for the shooting and is scheduled for a change of plea hearing May 21.

None of the victims or their family members attended Friday's sentencing.

But Kuchibhotla's widow, Sunayana Dumala, said in a statement directed to Purinton that she wished he could have seen beyond her husband's skin color to "the beautiful and kindhearted person underneath it."

She said the couple was looking forward to raising a family in the dream home they had found in Kansas.

"We were supposed to be together for lifetime but now the thought of having to live life alone and the hardships that come with it is unbearable," she wrote.

Dumala said her husband was working on several large contracts at Garmin when he was killed and those contracts will provide jobs to many people. "Imagine how much more he could have achieved and contributed to the community if not for your anger and hatred."

"I hope in the years that you must spend in the jail you will one day realize the magnitude of your mistake and work toward your penance," she said.

After the shooting, Purinton drove 70 miles to Clinton, Missouri, where he confessed the shooting to a bartender at a restaurant.

In a written statement filed when he pleaded guilty in March, Purinton said he accepted full responsibility for the "grievous harm" he caused the victims, their families and the community.

"I hope that this plea might, in some small way, help reduce the suffering that I have caused them all," he said in his statement.

Purinton, a Navy veteran, was a regular customer at Austin's. Neighbors in the Olathe neighborhood where he lived told the Associated Press that he became "a drunken mess" following his father's death about two years before the shooting and had physically and mentally deteriorated.