But in Saudi Arabia, the American focus on possible radicalization has left family and acquaintances bewildered, forced to answer for their son and friend to other Saudis.

Sensitive to Western stereotypes that often reflexively brand Muslims as terrorists, and aware that the kingdom cannot afford to lose Washington’s support, many Saudis have been eager to portray the lieutenant as a monstrous outlier. A hashtag declaring that he “does not represent” Saudis has dominated Twitter in the kingdom, and the news media has echoed the point.

“This work can only be done by a cowardly villain,” wrote Hamdan Al-Shehri, a political scientist, in the Arab News, a Saudi newspaper. “He has betrayed his country, which trusted him and spent millions on his education. Instead, he stabbed her in the back.”

The Saudi government is also extremely sensitive about the case, fearing that it could jeopardize a relationship already frayed by criticism in Washington over the war in Yemen and the killing of the journalist Jamal Khashoggi last year. King Salman, Crown Prince Mohammed bin Salman and other top officials have all condemned the shooting. Lieutenant Alshamrani’s family have said they were questioned by government officials.

In interviews, his father, brother, cousins and a family friend said that Lieutenant Alshamrani had always seemed content to be in the United States, working toward his longtime goal, never mentioning difficulties.