When documentary filmmaker River Hagg wanted to see the war in northern Syria up close, he had only one way in.

“I didn’t have any connections so I joined the YPG,” he said, referring to the Kurdish militia that the U.S. has supported with arms, training and air power as its chief on-the-ground ally in the fight against the militant group Islamic State. “I thought I would be a combat cameraman.”

But his plans changed when he realized wounded militia members were dying because of a shortage of medical personnel. Hagg, who had been a first responder in the Navy, became a combat medic — a calling that immersed him in suffering and left him in awe of his Kurdish comrades.

“The Kurds are beautiful,” he said. “They are so brave.”

Now he worries that the U.S. government “is opening the Kurds up to genocide.”

Hagg and other Americans who volunteered with them are livid over President Trump’s recent declaration that he plans to withdraw America’s 2,000 troops from Syria.

The Turkish government considers the militia — which leads a U.S.-backed coalition known as the Syrian Democratic Forces and is fighting to defend the mainly Kurdish area called Rojava — to be a terrorist group aligned with Kurdish separatists within Turkey and has threatened to attack them once the Americans leave.

Trump’s announcement — and the possibility that the U.S. would abandon an ally to the risk of slaughter — drew widespread condemnation in Washington, including from Defense Secretary James N. Mattis, who resigned last month in protest.

For the 100 or so American volunteers, the issue is deeply personal.

They came from all walks of life, some with military experience but many without. Upon arrival in Syria, most received basic weapons training along with classes on the history and culture of the Kurdish ethnic group, which is spread across Iran, Iraq, Syria and Turkey. After that, the volunteers were often sent into battle — where they watched many of their new friends die.

River Hagg mounted a camera on his AK-47 and took this photograph of himself in Manbij, Syria, after People's Protection Units, or YPG, tanks fired on Islamic State positions in the city. River Hagg

A photo taken by River Hagg shows Hagg (hands in photo) and Porter Goodman working on a casualty in Syria. River Hagg

“I would see the Kurds go into a city and half would be dead in an hour and then the next wave would come,” said Hagg, who filmed when he could, collecting the footage that eventually became “The Volunteers,” a documentary about his team of medics.

Now 43, he remains in close contact with his best Kurdish friend, Firat. Hagg nicknamed him Kurdiesel because his voice sounds like that of actor Vin Diesel. Firat calls Hagg “heval” — Kurdish for “comrade” or “friend.”

The two have spent hours on Snapchat talking about politics and the latest developments in the war, including a recent car bombing that killed a dozen Kurdish fighters and wounded Firat badly enough that he had to take a short break from the front.

“In the end, he always says the same thing to me: ‘It’s OK, my heval, I know I will die here. But I die for my people, I die for a homeland,’ ” Hagg said. “I tell him it’s not OK and nobody is killing the Kurdiesel.”

Hagg wears the YPG patches from his old uniform on his motorcycle jacket and, often, a YPG scarf around his neck.

Exactly how many American volunteers are still fighting in Syria is unknown. Many of those who have returned are now married with children, and the predominant feeling is that going back to take on Turkey’s modern military would be suicidal.

Still, John Foxx, 28, a former Marine who went to Syria twice, said he is thinking about it.

“The guilt from sitting back and watching this on the couch is too much,” he said. “I wouldn't fight, but I would go back as a medic. I will see how it develops.”

The war has transcended the battlefield, affecting not only the volunteers but also their families.

Susan Shirley, 61, of suburban Denver knew little about the Kurds, Islamic State or the Middle East when her son Levi walked into the kitchen one day and announced he was going to Syria.

He had tried to get into the Marines but was sidelined by poor eyesight.

In 2016, during the battle for Manbij, a city of more than 100,000 people, Levi went inside a building that had supposedly been cleared. He triggered a homemade bomb and died instantly. He was 24.

Since then, his mother has been emotionally invested in the Kurds and the defeat of Islamic State.

“I think withdrawal is a horrendous mistake, but that’s what we do,” she said. “We get knee-deep with people and then walk away.”

She also mourns another volunteer from Colorado, 22-year-old Jordan MacTaggart, who was also killed in Manbij.

“In the long term, for the sake of my personal sanity, I have to think what those guys did was not in vain,” Shirley said.

Susan Shirley with a picture of her son, Levi Jonathan Shirley, who was killed in Syria as a volunteer with an armed Kurdish group, known as YPG, battling Islamic State militants. Joe Amon / Denver Post via Getty Images

Levi Shirley, 23, right, and a U.S. comrade guard a position during clashes with Islamic State fighters on April 17, 2015, in the northern Syrian town of Tal Tamr near the border with Turkey, as they fight alongside People's Protection Units, or YPG, members. Uygar Onder Simsek / AFP/Getty Images

Porter Goodman, who joined the militia in 2016, was with Levi the day he was killed. Goodman was blown backward by the explosion and sustained multiple shrapnel wounds.

He now lives in Utah, where he’s trying to spread the word about the plight of the Kurds. He has sounded the alarm on podcasts and given talks at local schools.

“Our troops are playing a support role in Syria,” he said. “It’s not a quagmire, it’s nothing like Iraq or Afghanistan.”

Goodman, 30, went to Syria after serving in the Army. He describes himself as a “news addict” who watched Islamic State capture entire cities until the Kurds challenged them.

“I knew others had come and gone. I knew it was dangerous but I also knew there were things you could do to mitigate the risks,” he said.

Goodman joined a team of combat medics.

Like many, he was taken with the Kurdish militia and its modern ideas on gender equality and religious tolerance. Women fought alongside men. If there was a male general, there would be a female counterpart.

“When I was there they were hopeful that we would stand behind them,” Goodman said. “They were fighting for the things the U.S. supports.”

Patrick Kasprik, 27, went to Syria in 2016 — his first time overseas.

“I joined the YPG because they were average people who stepped up and did what they had to do,” he said. “They were lightly armed. I’d say the average age was 17 or 18. They got a couple months of rudimentary military training and that was it.”

As a medic, Kasprik helped set up five clinics. His team treated hundreds of casualties in Manbij alone.

He and his Kurdish comrades formed a bond, drawn close by the atrocities they witnessed together.

He said he’ll never forget the day he entered the Iraqi town of Sinjar, home to the ancient Yazidi religious sect, singled out for exceptional cruelty by Islamic State militants who falsely accused it of devil worship. Thousands of Yazidis were massacred, while thousands more women and girls were sold off as sex slaves.

“I looked genocide in the face,” Kasprik said. “I visited the cemeteries and the mass graves. I saw people’s lives destroyed just because of who they were.”

Now he worries about his friends and what would happen if a U.S. withdrawal allowed a depleted Islamic State to regain strength and take back territory.

“Young girls would be taken as sex slaves,” he said. “The men would be murdered.”

Former Marine Jayson Pihajlic, 32, served as an American volunteer soldier fighting with the Kurds in Syria. Genaro Molina / Los Angeles Times

Jayson Pihajlic grew up in Michigan and served with the Marines in Iraq before deciding to go fight Islamic State. He spent about 18 months with the Kurds.

”I love those people,” said Pihajlic, who appears in the documentary series “Hunting ISIS.”

Now 32, he said the U.S. forces he encountered in Syria were mostly medics and forward observers calling in artillery and air support for fighters on the ground.

“They were more of a deterrent force than people kicking in doors,” he said. “Without U.S. support it will fall into complete chaos. If, 2,000 troops can stop that from happening, to me, that’s kind of worth it.”

But the Kurdish fighters are used to betrayal, he said of the U.S. decision to pull out.

“The Kurds have a saying, ‘No friends but the mountains,’ ” he said. “Some of the older, wiser fighters knew this was coming.”