It was Oct. 1. The dead of night. Lucas Chapman was as close as he'd ever been to realizing his dream. He was finally getting smuggled into Syria.

The small group he was traveling with had just left the Iraqi Kurdish region. And the plan was to make it into Syria on foot.

"The entire walk was about seven hours," Chapman recalls. "So even after the first maybe half-hour, just walking up and down these gentle hills, I was like wheezing, gasping for air."

He had his big, heavy backpack. No flashlights; they would draw attention. No water because it sloshes around and makes noise.

It was like nothing he had ever done before.

Halfway through the trek, one of Chapman's Kurdish guides stopped him.

"He turns around. He says something to me in Kurdish. I didn't get it so I said, 'I'm sorry, I didn't get that.' And he just looked around and he made this little walking motion with his fingers and then he went 'boom.' I said, 'Oh mines!' He said, 'Yes, yes, mine, mine.' Everywhere, he motioned around. Everywhere," Chapman says. "So you bet that my nose was up the butt of the guy in front of me after hearing that. I just stuck right on him, which actually is very poor military practice walking through a mine field, but I didn't know that at the time."

That night was also Chapman's 21st birthday.

But it didn't matter. He had made up his mind about going to Syria two years before. He was in college at the time, majoring in Jewish history.

He saw news footage of ISIS rolling into Syria and promised himself that if the war was still going on by the time he graduated, he would drop everything and travel there.

"And then 2016 rolled around and I had to walk the walk, so to speak," he says.

He decided to volunteer for a Kurdish militia called the the People's Protection Units or the YPG. They control a swath of territory in northern Syria called Rojava.

And really, it was the YPG's ideology that pulled him in.

"It's part anarchism, part communism, part socialism," he explains. "Everyone gets a voice. That's what appealed to me so much about it."

There is an online video of Chapman in Syria where it looks like he is being interviewed by a news team. He is small, wearing dark-rimmed glasses and a military uniform.

"We’re getting ready for the Raqqa operation," he says, beaming with excitement and flashing two thumbs up. "I'm very excited to go to the front."

Chapman spent seven months in Syria as a volunteer fighter with the YPG. First there was training. Then, there were moments when he was on the front line. Other times, he and his American buddy, a florist from San Francisco, had to sit around. Bored.

Sometimes, he says, they had morale nights, when they "put a little fire on the roof ... set a little tire on fire and danced around and ate some donuts and drank some soda."

Thousands of foreign fighters have gone to Syria since the start of the civil war. Some have joined ISIS. Some have gone to fight against it.

It's hard to know exactly how many Americans have gone. Some estimates put the number at 100. Volunteers I spoke to say this is too low. They figure the real number is between 200 and 300. Maybe even more.

So what pushes these Americans to fight in another nation's war?

Another American who served with Chapman in the YPG divides the US volunteers into three groups. Some are adventurers or Rambo types. Others, like Chapman, sympathize with the leftist ideology of the YPG. And then there are the military veterans.

National security researcher Jason Fritz and his team at American University in Washington, DC, interviewed a dozen volunteers when they came back to the US. It turned out that most had served in the US military.

"Some of them are going because they missed military lifestyle," Fritz says. "Many of them had deployed to Iraq or Afghanistan with the US military or the US Marines. You also had a number of veterans who just didn't like seeing all of the work that they did and why some of them were wounded in or their friends killed being undone by the Islamic State."

This is exactly how Buck Clay felt in 2014, when ISIS was gaining strength.

Clay had served 11 years in the US army. He'd done several tours in Iraq.

"I did three years of my life in Iraq," he explains, "so to watch it all be flushed away, it was like something was being taken away from me. My contribution, the contribution of the people who went with me, the people who didn't make it back, it was all being swept away."

Clay was working for an electrical supply company in Ohio at the time. Not the most exciting chapter of his life, he says. So he saved up some money and got ready to leave.

"I put all my stuff in storage. I sold my car. I gave proper notice at my job. We had a little going away party and prepared to leave for an unknown amount of time," he says.

In the end, Clay says he spent about $8,000 on his trip to Syria. He had to pay for his own flights and his own gear. The Kurds provided him with food, weapons and shelter.

Was it worth it? Did he feel like he accomplished what he was after?

"Nope. Not at all," he says. "That's why I haven't gone back. It felt like a waste. I don't think I contributed much at all."

Unlike Chapman, Clay found it tough to embrace the ideology of the YPG.

"They wanted me to join the Communist Party and be a poster boy and that's all they wanted from me," he says.

He was done. After four months, he headed back to the US.

So how does a Texan or, say, a New Yorker find his or her way into a Kurdish militia in Syria?

It's actually not that hard. Do a little Googling and, in no time, emails and phone numbers will show up on your screen.

One of the YPG coordinators is a man called Zagros. Zagros isn't his real name and he won't disclose his location. But he walks me through the process.

He says when a foreign volunteer asks to join the YPG, first, the group sends them a document. Think of it as a YPG starter packet. There is a detailed explanation of the YPG ideology, followed by a long list of questions.

Some examples include: What do you think about our enemies? Have you had recurrent thoughts of suicide? Do you feel that you’re depressed a lot?

Zagros says there's a reason behind these questions.

"There was no procedure at the beginning, three or four years ago," he explains. "Because we were in a very intense fight we would accept almost everyone to come. Then we realized this is not the way that we should do it because some of the people came with their own problem, their own psychological problem, and we had to clear them out. We had to ask them to leave."

Zagros says he gets applications from all over the world. The US, Germany, even China. He says the YPG gets, on average, 25 applications in a month. More than half of them get approved.

"We are not recruiting them. They are contacting us," he says, "and they want to be part of this revolution. And we need the help from all around the world."

He says not all volunteers want to be on the front lines. Some want to teach English, for example, or help with reconstruction in areas that are taken back from ISIS.

Fritz, the American University researcher, worries about who ends up holding a gun in a place where there's no rule of law.

He says Americans wandering off to conflicts like Syria's raises so many questions.

"What about their conduct on the battlefield — if they engage in violence against unarmed civilians and such things?" he asks. "What happens if, I don't know, the Syrian government captures one? Now, the US is … they're not compelled to take action but at some point it could become a diplomatic headache."

There's also the chance that they get captured by ISIS. What then? The US doesn't officially pay ransom to terrorist groups.

Both Chapman and Clay say they always saved extra bullets in their weapons. Better dead than an ISIS prisoner, they said.

And there have been times when Americans have not made it back.

In July, at least three American died in Syria fighting ISIS, including Nicholas Warden of Buffalo, New York. He had served two tours in Afghanistan with the US Army.

I ask Zagros, the YPG guy, what happens when Americans die? Who takes care of their bodies?

"It's on the [will] of their family," he says. "If they want to have them back, we will send them back. Otherwise we have an international martyr's graveyard here, so we keep them as our own."

Zagros won't tell me how many Americans are buried in the international graveyard. But Chapman says he carried the casket of one American who's buried there and asked that the same be done with his own body, if he were killed.

"When you arrive and after you've gone through some training they have you make a video — 'in case I die' type of video and they take down your wishes," he says. "And I said, 'Look Jewish custom dictates that I have to be buried as soon as possible. So if that means I have to be buried in Rojava then bury me in Rojava. That's where I want to go.'"

The U.S. government particularly warns private U.S. citizens against traveling to Syria to engage in armed conflict. U.S. citizens who undertake such activity face extreme personal risks, including kidnapping, injury, or death. The U.S. government does not support this activity, and our ability to provide consular assistance to individuals who are injured or kidnapped, or to the families of individuals who die in the conflict, is extremely limited. Individuals who demonstrate an interest in groups opposing ISIS, including on social media, could open themselves to being targeted by ISIS itself if those individuals travel to Syria.

Fighting on behalf of or providing other forms of support to designated terrorist organizations, including ISIS and al-Nusrah Front, can constitute the provision of material support for terrorism, which is a crime under U.S. law that can result in penalties including prison time and large fines.

ISIS is not as strong as it was a couple of years ago. It has been losing territory left and right.

At the same time, the US has ramped up its support for the Kurds in Syria. It now sends them arms.

But none of this has slowed down the flow of foreign volunteers to Syria.

“There's always an appeal and a kind of romance in the idea [of] joining some very distant fight for a good cause,” says Adam Hochschild, author of a book called "Spain in Our Hearts,” about Americans who fought in the Spanish Civil War.

In the mid-1930s some 2,800 Americans boarded steam boats from New York and headed to Spain to fight against the fascist dictator Francisco Franco.

“Most, though by no means all of them, were members or supporters of the Communist Party,” Hochschild explains. “And those 2,800 Americans going to Spain were by far the largest number of Americans who'd ever gotten involved in somebody else's civil war.”

Famously, Ernest Hemingway made it there. His novel, "For Whom the Bell Tolls," is based on his trip. He also narrated a documentary called "The Spanish Earth."

Hochschild sees a parallel between the Spanish Civil War and the Syrian one. But he's also cautious about the differences.

“I think the volunteers who are going there, although I deeply respect their good intentions," he says, "they're stepping into a very complicated political cauldron with major state actors like the United States, Russia, Iran, Turkey … all maneuvering around the edge of this situation. I think it's a little less clear cut than the Spanish Civil War was, where at the time, even though there were political complexities there too, it was really a question of did you want or did you not want Hitler and Mussolini to have an ally in Europe.”

But for today's volunteers, these complexities are just footnotes.

Like the American guy who wanted to go by the name Donut. He's in Germany awaiting a green light from the YPG to come to Rojava.

He's a student. A city boy. Hasn't held a gun in his life. But he considers himself a leftist and admires the American volunteers who fought in the Spanish Civil War.

“Each generation gets only a limited amount of opportunities to actually make a difference in the world,” he says, “for me and like-minded individuals the Rojava revolution is the Spanish Civil War of our time.”

To be clear, what these volunteers do is not against the law. As long as they don't join a terrorist group or help an enemy of the US.

Still, they get questioned upon their return to the US. That's what happened to Chapman and Clay when they came back.

Since his return, Chapman says, he hears from wannabe volunteers all the time. For the most part, he tries to persuade them not to go.

“I've lost a lot of people and it really shook me,” he says, “like having interacted with these guys, knowing about their families. Some of them left daughters behind. Little kids.”

He tells them, "Find another way to help. Become an activist, for example."

And that's what he has done. Today, he works for the North American Kurdish Alliance, a nonprofit that lobbies for Kurdish rights in the US. They also hold rallies and help the families of Americans who've died in Syria fighting ISIS.

“But if there's nothing I can do, then I think back to myself. And I think, 'OK. There was nothing that could have stopped me. So I would much rather give this person advice, help them prepare to go over there and try as hard as I can to keep them from coming back in a body bag.”

Chapman told me that the day before we met, he managed to talk one volunteer out of going to Syria. Success.