In a rocky valley in Afghanistan eight years ago, Taliban fighters opened fire on U.S. forces from three sides, pinning the Americans and the Afghan troops they were training in a kill zone. Chaos erupted immediately. One group of U.S. Marines was pinned down under a hail of fire alone, and other American soldiers and Marines tried to fight their way to them.

The bloody Sept. 8, 2009, battle in Kunar Province’s village of Ganjgal is one of the U.S. military’s most traumatic in the long war in Afghanistan. Five U.S. service members were killed, prompted soul-searching about whether the U.S. troops in the field were adequately supported, and led to two Medals of Honor — the nation’s highest award for valor in combat.

But the battle also is something else: A lesson in how the U.S. military is a kaleidoscope of cultures, races and religions, with units pulling together to meet common goals under occasionally brutal circumstances.

That reminder seems timely following a Washington Post report Thursday that said that during an Oval Office meeting with lawmakers focused on immigration reform, President Trump asked of people from African countries, El Salvador and Haiti: “Why are we having all these people from shithole countries come here?”

The White House did not deny the report Thursday night, and other media outlets subsequently confirmed it. Trump took to Twitter on Friday morning and said that the language he used in the meeting was “tough,” but “this was not the language used,” but Sen. Dick Durbin (D.-Ill.), who was present during the meeting, decried Trump’s comments a short time later as “hate-filled, vile and racist.”

In Ganjgal, the Medal of Honor recipients were then-Marine Cpl. Dakota Meyer, of Greensburg, Ky., and Army Capt. William Swenson, of Seattle. But they were greatly assisted by two other service members who were immigrants.

Marine Maj. Ademola Fabayo — a Nigerian-born American citizen —  earned the Navy Cross — second only to the Medal of Honor in recognizing combat valor — for maneuvering through a kill zone on foot, “effectively engaging the enemy at close range with his M-4 rifle.” Then a first lieutenant, he moved under heavy fire to assist in the the recovery of a wounded U.S. soldier who later died, Sgt. 1st Class Kenneth Westbrook, and drove back into the kill zone in an unarmored truck with Swenson in an attempt to find the missing Marine Corps team.

Then-Marine Staff Sgt. Juan Rodriguez-Chavez — originally from Mexico — also earned the Navy Cross. He is credited with driving Meyer into the kill zone three times in attempt to reach the missing Marines, and then making a fourth trip with Meyer, Fabayo and Swenson to recover the remains of their fallen colleagues after Meyer found them. Rodriguez-Chavez parked the vehicle in a way in which it could block intense enemy fire, allowing others to leave the vehicles and recover the bodies.

Marine Gunnery Sgt. Juan Rodriguez-Chavez, originally from Mexico, earned the Navy Cross after driving into a kill zone four times to rescue others. (Lance Cpl. Brendan King/Marine Corps Air Station Yuma)

The Americans killed in the battle include Gunnery Sgts. Edwin “Wayne” Johnson and Aaron Kenefick, 1st Lt. Michael Johnson and Hospital Corpsman 3rd Class James Layton. Westbrook died a month later in a military hospital.

Meyer praised the contributions of the immigrants who served alongside him in the battle in a tweet at Trump on Saturday. Sharing a link to this story, he said “the only reason I’m alive is the effort immigrants including my Afghan interpreter who is now an American immigrant.”

There are many other examples of immigrants stepping forward to serve. In one recent example, Pfc. Emmanuel Mensah, a member of the Army National Guard who immigrated from Ghana several years ago, was killed in a Dec. 28 fire in New York’s Bronx section while attempting to rescue others. He was credited with saving four lives. Army Times reported Wednesday that he will receive the Soldier’s Medal, his service’s highest award for valor outside combat.

In 2016, the image of a tearful Haitian immigrant at his commencement ceremony at the U.S. Military Academy at West Point, N.Y., 2nd Lt. Alix Schoelcher Idrache, went viral after the Army published it. The soldier, who went on to train to fly helicopters, later thanked people for their support, and said he was overwhelmed in the moment the photograph was taken.

“Knowing that one day I will be a pilot is humbling beyond words,” Idrache wrote in an Instagram post. “I could not help but be flooded with emotions knowing that I will be leading these men and women who are willing to give their all to preserve what we value as the American way of life. To me, that is the greatest honor. Once again, thank you.”

There are more than 511,000 foreign-born U.S. veterans, according to the Migration Policy Institute. That represents about 3 percent of the 18.8 million veterans in the nation. Additionally, 1.5 million veterans have at least one parent who is in an immigrant, according to the institute.

In a video posted in May 2016, Haitian immigrant 2nd Lt. Alix Schoelcher Idrache spoke about his dreams and motivations. (Maryland Guard)

About 5,000 non-citizens join the U.S. military each year, with about 25,000 non-citizens across the force, U.S. military officials have said. U.S. service members are allowed to apply for citizenship and can obtain it if they show good moral character, knowledge of the English language, understanding of U.S. civics and a willingness to take an oath of allegiance to the United States, according to U.S. Citizenship and Immigration Services. The agency said it naturalized more than 109,000 people between October 2001 and October 2015.

The number of non-citizens in the military during the early salvos of the Iraq War was even higher — about 38,000, according to several published reports. One of the very first military fatalities in that war was Marine Lance Cpl. Jose Gutierrez, an undocumented immigrant from Guatemala.

He was granted his citizenship after his death.

This story was initially published Friday at 12:08 p.m., and updated Saturday at 4:57 p.m. with reaction from Dakota Meyer.