A white man accused of opening fire on two Indian immigrants at a Kansas bar in February in a shooting that heightened international concern about American hostility toward foreigners has been indicted on federal hate crime charges, the Justice Department announced Friday.

Adam W. Purinton was kicked out of a bar in Olathe, Kan., on Feb. 22 after patrons complained that he had leveled ethnic slurs at the two men and questioned their immigration status. But Mr. Purinton, 52, soon returned to Austins Bar with a semiautomatic pistol and shot the men, killing one and injuring the other, the authorities said. The gunman also shot a third man who attempted to intervene, striking him in the hand and in the chest, the indictment says.

On Friday, the Justice Department announced that Mr. Purinton had been indicted by a federal grand jury on two hate crime charges and a firearm charge.

The indictment accuses Mr. Purinton of shooting and killing one of the Indian nationals, Srinivas Kuchibhotla, 32, “because of his actual and perceived race, color, religion and national origin.” It also charged that he committed the same crime against the second Indian national, Alok Madasani, who was wounded but survived. Both men worked as engineers for Garmin, a GPS navigation and communications device company.

A third count in the indictment accuses Mr. Purinton of violating a federal firearms statute by shooting at the two Indian men and the third man who tried to confront him, Ian Grillot.

If convicted of the federal charges, Mr. Purinton could face the death penalty, though prosecutors said they would decide later whether to pursue it.

In a telephone interview on Friday, Mr. Kuchibhotla’s widow, Sunayana Dumala, said news of the new charges brought a mix of relief and renewed pain.

“It is a reminder to me that Srinivas is not here with us, but I am happy that things are moving along,” said Ms. Dumala, 32. “The federal charges will give us national visibility to help spread the message of reducing hate crimes. My belief that justice will be served has gotten one step closer.”

Friday’s announcement was far from a surprise; federal authorities said they were investigating the attack as a hate crime just days after the shooting occurred. And Mr. Purinton is facing state charges of premeditated first-degree murder and two counts of attempted premeditated first-degree murder.

The Justice Department was under pressure to bring federal charges in the case, as the shooting heightened concern that President Trump’s tough talk on immigration was helping foster a climate of hostility toward foreigners. Reports of hateful episodes and attacks this year have prompted several states to craft anti-hate legislation aimed at beefing up penalties and expanding definitions of what constitutes hate.

But the attack also created anxiety that rippled far beyond the United States. In India, news of the shooting instilled a combination of fury, fear and uncertainty in the minds of some who were mulling moves to America for work or schooling.

The shooting occurred late on a Wednesday night. Mr. Purinton and Mr. Madasani were sitting on the bar’s patio on when Mr. Purinton asked the men “what visa are we currently on and whether we are staying here illegally,” Mr. Madasani said in an interview with The New York Times shortly after the shooting.

Mr. Madasani said he went inside the bar to get a manager, and by the time he came back, the man was being escorted out.

But Mr. Purinton soon returned in rage and opened fire on Mr. Kuchibhotla and Mr. Madasani, the authorities said.

After the shooting began, Mr. Grillot, the other bar patron, tried to count the shots while he hid under a table, he told The Times. Thinking the gunman had run out of ammunition, Mr. Grillot said, he tried to intervene, but was shot.

Soon after the attack, the White House press secretary, Sean Spicer, called the episode “tragic” but rejected any link between Mr. Trump’s policy agenda and anti-immigrant violence as “absurd.”

Several days after the shooting, Mr. Trump denounced the episode and the desecration of two Jewish cemeteries by saying that the country “stands united in condemning hate and evil.”

The White House also issued a statement the same day condemning the shooting as “an act of racially motivated hatred.”