“We’re Americans!” Ali shouted as bullets shattered the glass of the car he hid behind. “Americans!”

He’d been fighting alongside United States troops for years by then. He’d faced I.E.D.-riddled streets and served in the 2004 battle of Najaf, one of the fiercest early battles of the Iraq war. But never before had he been so certain he was going to die.

Ali’s lieutenant was wounded in the shoulder. Reinforcements were an hour away. And it seemed as though the whole city of Baghdad was shooting at them.

This was in 2006, in a neighborhood called Hurriya, as sectarian violence was beginning to engulf Iraq. Two days before, Shiites from the Ministry of the Interior had showed up and taken away several youths for “questioning,” only to execute them and dump their bodies in the street. And then Ali arrived with a newly trained Iraqi special forces unit and three American soldiers.

“We hit the town,” he later explained, “and the target’s family took a shot at us, thinking that this is the same people who came two days ago.” They fired back, and soon gunfire was coming from all around. Which is when Ali started trying to calm things by announcing that they were Americans.

But Ali himself wasn’t American — at least not yet. Born in Baghdad, the son of an Iraqi Army sergeant major, he’d come to hold ideas about America that by 2006, after years of occupation that included prisoner abuse at Abu Ghraib and the Haditha killings of unarmed civilians, many of his fellow Iraqis didn’t share.

Ali Interpreter for the United States military in the Iraq War 2004 to 2007 Applied and approved for American visa 2007 Enlisted in United States Army 2008 Became naturalized American citizen 2009 Deployed with United States Army April to September 2009

Those ideas were forged when Ali was a 13-year-old awaiting the Persian Gulf war. Rumors spread that Americans would defile Iraq’s holy places, pervert the culture and torture the innocent. “We didn’t know anything,” Ali said. “We were living in a big prison.” Ali’s father noticed his family’s nervousness and gathered the clan together. “Americans would never target civilians,” he told them. “So let’s just enjoy the show.”

It took the Sept. 11 attacks to bring “the show.” Once again, rumors swirled: The Humvee is indestructible. American soldiers take one pill and they don’t eat or drink for days. And then came first contact. Thousands of leaflets raining from the sky, delivering the message: “The Coalition wishes no harm to the innocent Iraqi civilians.” To Ali, it confirmed his father’s belief in the difference between America and the brutal Saddam Hussein regime his whole family hated but never talked about. “I took one of the leaflets and showed my father,” Ali said, “and he was like, ‘Yeah, I told you, man.’”

And so Ali signed up as an interpreter for the Americans, whose official rhetoric claimed they were promoting classical liberal values in Iraq, establishing a vision realized on their own shores but belonging to all mankind — democracy, freedom and equality. At least that was the theory. And in theory, we could “go forward with complete confidence,” as President George W. Bush proclaimed, “because freedom is the permanent hope of mankind, the hunger in dark places, the longing of the soul.” In theory, that longing would lead Iraqis to greet American troops as liberators and make the shouted words “We’re Americans!” capable of calming a firefight in a hostile neighborhood.

In practice, and in American history, more has been required. America may be “a nation of immigrants,” where people of different nations and faiths forge a common identity. But that common identity has relied on far more than the notion of all people hungering for freedom in dark places. For citizens to labor and sacrifice on a nation’s behalf, they must feel what Edward Wilmot Blyden called “the poetry of politics,” that sense of inclusion in a broader community with its own distinctive character and historical consciousness.

The American problem was reconciling this with a universalistic ethic open to all people. And throughout our history, we have relied not simply on ideas but on a far more atavistic, unstable and dangerous tool: war.

A uniform belonging to Charles Whittlesey, a World War I hero, who led a unit made up of mostly foreign-born soldiers. The outbreak of World War I meant that thousands of immigrants could prove their Americanness on the battlefield.

During the 1912 presidential election, Charles White Whittlesey, the man who would arguably become the greatest hero of World War I — a man so famous that even the carrier pigeon who delivered his battlefield messages became a household name — cast his vote for the pacifist socialist Eugene Debs. Whittlesey, a tall, bookish 28-year-old lawyer, had taken to socialism as a student a decade earlier at Williams College. In the words of the historian Richard J. Laplander, he believed “socialism could be the only vehicle through which a wider cooperation of peoples of all types could come about.”

That was a pressing issue in 1912. Great waves of new immigrants had come to America starting in the 1880s, immigrants the United States Immigration Commission declared were “races” deficient in “intelligence, manliness, cooperation” and other qualities without which “democracy is futile.” About a third of the nation was foreign-born or the child of a foreign-born parent. One-tenth was black.

But the outbreak of a European Great War meant these derided groups could prove their Americanness on the battlefield. When immigrants and native-born Americans rub “elbows in a common service to a common Fatherland,” claimed the assistant secretary of war, Henry Breckinridge, “out comes the hyphen — up goes the Stars and Stripes … Universal military service will be the elder brother of the public school in fusing this American race.”

There were less martial versions of this idea. After a German submarine had torpedoed a British liner and killed 128 Americans, Woodrow Wilson even suggested to a crowd of 4,000 newly naturalized citizens, many from Germany, that it was immigrants themselves who helped define Americanness. “A man does not go out to seek the thing that is not in him,” he said, and “if some of us have forgotten what America believed in, you, at any rate, imported in your own hearts a renewal of the belief.”

Whittlesey assumed America would enter the war and that every honorable American should serve. Disillusioned with the Socialist Party’s pacifism, he entered military training in 1916. When the United States entered the war in 1917, he was assigned to one of the new regiments being formed in that most suspicious of places — New York.

“Patriots” had warned against raising troops there. New York was filled with blacks and immigrants, as the new regiments would reflect. The 369th “Harlem Hellfighters” were a black American infantry regiment whose service, civil rights activists like James Weldon Johnson believed, would help ensure “the right to claim the full rights of citizenship.” And then there was the 308th Infantry, part of the “Melting Pot Division” and heavily weighted with Italians, Eastern Europeans, Chinese and Jews. As one soon-to-be highly decorated soldier from another division that would train and fight alongside those men, Alvin York, described in his diary, “they put me by some Greeks and Italians to sleep. I couldn’t understand them and they couldn’t understand me.” It was in the 308th that Whittlesey would fight.

Whittlesey’s unit saw initial action in Alsace-Lorraine and acquitted itself well. In his diary York noted, “Those Greeks and Italians and New York Jews were sure turning out to be good soldiers.” And then, in late September in the Meuse-Argonne, they would earn their fame.

“Let’s go!” Whittlesey rasped, striding towards the Argonne Forest, over what one officer described as a “blind world of whiteness and noise, groping over something like the surface of the moon.” It was the first of several pushes over several days. Communication lines kept getting cut. Their left flank became increasingly exposed, a concern Whittlesey’s senior officer waved off as “nonsense.” On Oct. 2, Whittlesey led a further attack. It did not go well.

They lost contact with flanking units and were completely encircled by the most experienced Germans, as recounted by Jonathan H. Ebel in “G.I. Messiahs.” They shot American runners and repeatedly assaulted the unit. Whittlesey’s battalion had low supplies, then no supplies. They had to strip bandages off corpses to apply to the freshly wounded. Whittlesey kept calm, buried his dead and refused demands for surrender. For five days.

His men died in scores. And their death cries wouldn’t have been only in English. Of the total American Expeditionary Force sent over to Europe, nearly a quarter were foreign-born, speaking 49 languages. When friendly units reached Whittlesey, some 360 of his 554 men were dead, missing or injured. The survivors became instant heroes.

“The Forest of Argonne blazed all at once into russets and golds and purples,” wrote one reporter, “and here and there a scarlet tree, as though the roots had drunk deep of young American blood spent freely for an eternal cause once more defended on those hills.” But how, precisely, to define that “eternal cause”?

When President Wilson asked Congress to declare war, he claimed he simply wished to champion “the rights of mankind.” For Whittlesey, who would endorse the League of Nations, universalist idealism clearly resonated. For the rest of the country, though, it was a harder sell.

Wartime paranoia provided fodder for nativists who’d always despised those who, as the New York police commissioner put it in 1906, “can’t talk the English language” and “are in general the scum of Europe.”

So when Whittlesey delivered a speech in New York a mere two months after surviving the Argonne, he found himself out of step with his country. After recounting the heroism of the battalion’s Catholic chaplain, James Halligan, Whittlesey informed the audience, “Our men who have been facing and fighting the Germans won’t come back hating them. Why, they might even share their cigarettes with the Kaiser himself if they met him on the road.” One newspaper account noted, “Silence greeted this portion of the speaker’s address.”

Ted, right inset, served as an interpreter in Iraq, alongside Ben Wormington, a U.S. Marine. Wormington keeps the image on his computer. He’s like a Marine to me, a Marine that we’ve left behind. If they stamped his passport, I would pay for his flight and his family would live in my house in Omaha.” — Ben Wormington, a former Marine, keeps a digital photograph of himself with Ted, inset right, his Iraqi interpreter during the war.

In 2007, a spiky-haired kid who went by the name Ted signed up for the same job Ali had taken in 2004 — interpreter for United States forces. Originally from northern Iraq, Ted had learned English watching shows like “Cheers” and “Seinfeld.” To him, America was Soup Nazis and bars where everyone knew your name. And like Ali, he welcomed the coming invasion.

But when insurgents threatened him for talking to Americans, he’d fled to Syria for a year. This meant Ted, who picked his interpreter name because of a fondness for the actor Ted Danson, began working with Marines at a different — and very deadly — stage of the war. His first posting was with a Marine reconnaissance unit.

“I had no idea what Marine recon was,” he recalled, laughing. Ted, with barely any training but attached to an aggressive, elite unit, soon found himself under fire. “I got a cold feeling,” he said. “I didn’t feel anything.” But this numbness helped him operate, as did the example of the Marines around him. “It’s very intense, firefights,” he said. “But the people I worked with, they’re brave men.”

Ted soon proved his own bravery. During a platoon-wide operation, his unit exchanged fire with insurgents, one of whom signaled he’d like to surrender. Since captured insurgents could yield critical, time-sensitive intelligence, Ted ran through enemy fire to the house and conducted an interrogation that, according to the commendation written by his battalion commander, helped “decisively end the engagement.”

Around this time Ted learned of a new program offering special immigrant visas to those who worked with United States armed forces. In one sense, the program could be seen as a smaller-scale continuation of that old American idea that you could earn the title “American” by fighting for America.

But the program had a second, more practical purpose: to prove that America was a trustworthy partner in the complex wars we’re currently fighting. Interpreters are essential links between American soldiers and the local troops they train, the neighborhoods they patrol and the intelligence sources they depend on.

To insurgent groups, cutting off the link is critical. “Nine bullets for the apostate, one for the Crusader,” was the slogan of an early ISIS strategy, emphasizing killing Muslim allies over Americans. That is why they have gunned down interpreters, kidnapped and beheaded them, killed their cousins and fathers and friends. And it is why generals like David Petraeus and Stanley McChrystal have publicly supported the program. One of the early beneficiaries was none other than Ali.

In 2007, one year after that firefight in Hurriya, Ali received a visa for the United States. Within a year, he joined the United States Army. His own trajectory seemed proof that the American dream was alive and well and truly universal.

For Ted, though, the American dream would prove harder to reach. He’d started fighting with Americans later in the war, and so by the time he would apply, events in both Iraq and America would make following Ali’s path far more difficult.

Ted Interpreter for the United States military in the Iraq War 2007 to 2010 Applied for United States visa 2008 His application has been stalled and he awaits progress on his case in Iraq.

First, his career as an interpreter ended with an on-the-job back injury that left him lying in a bed for months without support or medication. Then, as ISIS began taking territory, the State Department removed nonessential staff and discontinued refugee processing for six months. Since security clearances have an expiration date, this created a cascade effect, where applicants who had been cleared had to redo their screening process, all during a time when there were fewer personnel to conduct interviews, and applications were spiking because everyone who had worked with Americans was under increased threat.

“He’s like a Marine to me,” said the former Marine Ben Wormington, who fought alongside Ted. “A Marine that we’ve left behind. If they stamped his passport, I would pay for his flight and his family would live in my house in Omaha.”

Ben Wormington has a place in his home in Bennington, Neb., for Ted, the translator who fought alongside him in Iraq.

Nevertheless, his case languished in the backlog. And then Donald Trump became president, a man who had called for a shutdown of Muslim immigration and suggested that the children of Muslim-American parents were responsible for terrorist attacks, that Arab-Americans had cheered the Sept. 11 attacks, that for Muslims there is “no real assimilation.” Once again, as occurred a century before, the fitness of a category of people for American democracy was called into question, and the immigration system would soon respond.

At first, admissions moved only slightly slower, with 11,929 total admissions of Iraqi refugees and special immigrants in fiscal year 2016, and 9,341 in 2017. In January 2017, the travel ban hit, suspending refugee admissions to the United States for 120 days. And though the administration would eventually clarify that the ban affected only one of the two main programs used by interpreters, the pace nonetheless slowed considerably. By fiscal year 2018, there would be only 745 admissions. By 2019, 646.

The Peace Monument, near the United States Capitol building in Washington.

This prompted a March 8 letter from 32 members of Congress of both parties complaining about the administration’s slow processing of visas. “The Iraqi program has a backlog of more than 100,000 people due to slowdowns,” the letter noted. This echoed earlier complaints from the Pentagon that the delays would harm national security.

They have also harmed Ted. He lives under threat, in an area of Iraq controlled by militias. Not even his children know about his past, because a slip of the tongue could mean his life. The execution of a former interpreter, after all, is a powerful propaganda tool. It would suggest that America doesn’t live up to its promises or keep faith with those who served it. But of course, this would hardly be the first time, or the last, that America has betrayed those who fought for it.

By 1919, after the conclusion of the war that had claimed 116,516 American lives, President Wilson’s message about foreign-born Americans had changed. “Any man who carries a hyphen about with him carries a dagger that he is ready to plunge into the vitals of this Republic whenever he gets ready,” he said. Many of those 116,516 were carrying hyphens.

The Socialist Party’s 1917 response to American entry into the war said that wars “breed a sinister spirit of passion, unreason, race hatred and false patriotism,” and the following years provided ample proof.

There had already been anti-immigrant violence, like the lynching of a German-born man, Robert Paul Prager. Meanwhile, groups like the Ku Klux Klan, the American Protective Association and the Native Sons of the Golden West intimidated and scrutinized German, Catholic, Jewish and Japanese immigrants.

As is usual in American history, though, the violence fell heaviest on black Americans. They came home from war to a wave of anti-black riots. And black veterans quickly found their service acknowledged not as a claim to full citizenship but as a threat. The attacks on them included lynchings, many detailed in the work of the historian Vincent Mikkelsen.

There was Pvt. Charles Lewis, arrested while in uniform, beaten by a mob, lynched and left swinging from a blood-soaked rope on Dec. 15, 1918, little more than a month after the armistice.

Wilbur Little, arrested for wearing his military uniform for “too long,” beaten to death in Blakely, Ga.

Bud Johnson, chained to a stake in Pace, Fla., was reported to have said, “Would that I had died in Germany rather than come back here and die by the hand of the people I was protecting,” then burned alive.

Unmarked graves in a cemetery in Milton, Fla. The city is considering a marker in honor of the black World War I veteran Bud Johnson, who was lynched in nearby Pace, Fla., in 1919.

More followed. Frank Livingston. Robert Truett. Charles Kelly. Clinton Briggs. Jim Grant. Lucius McCarty and others. Veterans of the Great War were hung from telephone poles and bridges, dragged behind cars, burned, beaten, chained to trees and riddled with bullets.

In postwar America only certain versions of self-sacrifice began to count. They were those that could be interpreted as sacrifice on behalf of a very particular, racially, ethnically and culturally defined version of Americanness.

That’s why a 1919 Armistice Day parade could end with the lynching of Wesley Everest, a veteran who was a member of the Industrial Workers of the World. And the Emergency Quota Act of 1921, which imposed the first numerical limits on immigration, passed in the same year as the interment of the Unknown Soldier, when the president and congressmen and Supreme Court justices and tens of thousands of Americans paid homage to a corpse made unrecognizable by war. The corpse was marched down the National Mall; a quartet of singers from the Metropolitan Opera compared his sacrifice to Christ’s. And one of the pallbearers was Charles White Whittlesey.

No doubt, most of the mourners imagined a strapping, young, white, native-born American in the coffin, but he was chosen from corpses ravaged beyond recognition by war. He could have been anyone.

He could even have been from Whittlesey’s battalion. And Whittlesey would have been acutely aware of the disconnect between the glorious celebration for this unknown soldier and the lives his men faced back here in America.

The Tomb of the Unknowns at Arlington National Cemetery in Arlington, Va. Charles Whittlesey was one of the pallbearers for the soldier buried there in 1921.

In his years home, Whittlesey became more guarded, though he did speak out against discrimination, claiming at an event organized to protest anti-Semitism, “If I am ever pessimistic of the future of this country, I would always feel assured that I could go to the crowded quarters of the city and pick out Herschkowitz, Ciriglio and O’Brien, and know that in them I could find the kind of men that were needed.” He helped the Polish stowaway cousin of one of his soldiers avoid deportation. And the over-the-top ceremony for the Unknown Soldier deeply unsettled him. “I should not have come here,” he told a friend. “I shall have nightmares tonight and hear the wounded screaming once again.”

Soon after, Whittlesey visited friends. He organized his desk. He drew up a new will. Then, on Nov. 26, he boarded a ship bound for Havana and during the night jumped from the deck and disappeared beneath the waters.

The story of Whittlesey’s end has recently been recast as one of trauma or survivor’s guilt. But in the immediate aftermath, there were other, less safely individualistic interpretations. To Willa Cather, whose cousin died in action in 1918, the war dead had a certain perverse luck. A man who died overseas could do so, she wrote in her novel “One of Ours,” “believing his own country better than it is.” Those who lived, after all, had to face “the desolating disappointment” of postwar America. Too many of “the heroes of that war, the men of dazzling soldiership,” would die by their own hand, like the one who chose to “slip over a vessel’s side and disappear into the sea.” She believed these suicides represented “the ones who had hoped extravagantly — who in order to do what they did had to hope extravagantly, and to believe passionately. And they found they had hoped and believed too much.”

Ali acquitted himself well as a soldier, serving with Special Operations troops, and playing an instrumental role in the capture of a high-level ISIS leader. He lives in Florida these days, still works in national security and remains certain that his work allows him to fully live two identities, a hyphenated American providing a “service for America and for Iraq.”

Ted waits for progress on his case. “When I’ve been in a bad situation,” he says, “I’ll imagine myself wearing my vest and my helmet, surrounded by Marines, and I’ll tell myself, ‘Hey, Ted, you’re a Marine, you can get through these obstacles.’ And that’s why I’m still hanging in there, man.”

Recent protests in Iraq have blacked out internet access, so Ben Wormington, the former Marine who served with Ted, checks Ted’s email for him, so that he can call him if any word from the State Department ever comes. Wormington thinks supporting his brother-in-arms is just an extension of what it means to be a Marine and to serve his country. “Being an American is like being a Christian,” he says. “It ain’t easy. Nobody said it was going to be easy. But if you don’t pursue those beliefs, then you don’t believe.”

Over Skype, Ted details some of the challenges he has been facing, including a recent bout of typhoid. “We got a lot of bad bugs here,” he says with a grin, waving away his health issues. And then he turns ruminative.

“I want to live American dreams,” he says. “To live free. Freedom and respect. That’s the American dream. And I still think I’m a Marine. I’m honored to be a Marine. I wish that I could work with the Marines one more time.” As he says this his children enter the room, and they come over and crawl over him. He smiles and laughs and adds: “I think I’ve got a chance. I did my interview. Just medical, and then I’m out of here.”

Given the current state of our immigration and refugee policies, it’s unlikely to be that easy. Nor is it quite clear, at a time when even those who literally risked their lives under fire for America are not allowed to come and add their skills and talents to the country, what precisely the “American dream” now means.

“It’s about courage and cowardice,” says Travis Weiner, a two-tour Army infantry veteran whose interpreter was killed in Iraq years after he’d applied for a visa. “If people’s emotions about immigration are such that they are willing to tolerate literally leaving our wartime allies behind on the battlefield because they’re foreigners and they look different, even though they’ve done more for this country than most Americans — if that’s the case, then we really need to do a gut check about whether we really are the people we say we are.”

“I want to live American dreams. To live free. Freedom and respect. That’s the American dream.” — Ted, former Iraqi interpreter, who has been waiting since 2008 for his American visa

But as our recent, abrupt withdrawal from Syria shows, where Kurds who fought with us have faced slaughter at Turkey’s hands, leaving our battlefield allies behind is becoming a pattern. So what hope does that leave a guy like Ted?

Perhaps the story we tell ourselves is a lie. Perhaps there is another sort of distinct “Americanness.” It’s one thing to admit a Muslim refugee fleeing violence. But someone who has already fought and sacrificed for America, who has served in combat alongside elite military units in a time when only a fraction of Americans serve at all, is a much greater threat — not to our national security, but to that sense of ourselves and our “Americanness” that rears up in times of war.

Or perhaps our history offers other versions of American identity. By the end of his presidency, Ronald Reagan spoke of America as the city on a hill, a city “teeming with people of all kinds living in harmony and peace,” where “if there had to be city walls, the walls had doors and the doors were open to anyone with the will and the heart to get here.” In this vision, patriotism is tied to immigration. And it’s a vision that corresponded to a continuing American reality.

America is home to 19 percent of the world’s migrants, many times more than present in any other nation. Seventy-five percent of Americans say immigration is a good thing, and 68 percent say openness to foreigners is “essential to who we are as a nation.”

If that’s true, then it means that part of the American character, our essential “Americanness,” must lie in the very turbulence caused by immigration, the melding of different peoples as well as the new forms of cultural expression and patriotic commitment that arise in the process. In that regard, American identity is like Heraclitus’ river, which no one can step into twice.

But to accept this requires faith in the fundamental principles of American life to unify diverse peoples. It requires a love of country, a bitter rage at how far we are from our country’s promise and a determination to work to make that promise a reality. More than anything, it requires a degree of optimism in the face of ceaseless change. It takes courage.

Phil Klay (@PhilKlay) is the author of the forthcoming novel “Missionaries” and a veteran of the United States Marine Corps.

The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.