TIJUANA, MEXICO - JULY 03:  U.S. Army veteran Hector Barajas looks out over the city on July 3, 2017 in Tijuana, Mexico. The Deported Veterans Support House, also known as "The Bunker" was founded by deported U.S. Army veteran Hector Barajas to support deported veterans by offering food, shelter, clothing as well as advocating for political legislation that would prohibit future deportations of veterans. There are an estimated 11,000 non-citizens serving in the U.S. military and most will be naturalized during or following their service. Those who leave the military early or who are convicted of a crime after serving can be deported.  (Photo by Justin Sullivan/Getty Images)
Justin Sullivan/Getty Images South America/Getty Images
TIJUANA, MEXICO - JULY 03: U.S. Army veteran Hector Barajas looks out over the city on July 3, 2017 in Tijuana, Mexico. The Deported Veterans Support House, also known as "The Bunker" was founded by deported U.S. Army veteran Hector Barajas to support deported veterans by offering food, shelter, clothing as well as advocating for political legislation that would prohibit future deportations of veterans. There are an estimated 11,000 non-citizens serving in the U.S. military and most will be naturalized during or following their service. Those who leave the military early or who are convicted of a crime after serving can be deported. (Photo by Justin Sullivan/Getty Images)
Now playing
04:02
Deported U.S. military veterans live in limbo
Getty Images
Now playing
01:47
The GOP frontrunners on immigration: 1980 and today
immigration debate fact check border control orig_00003920.jpg
immigration debate fact check border control orig_00003920.jpg
Now playing
01:46
The debate over immigration
Now playing
02:10
Can a wall be built between U.S. and Mexico?
jan brewer immigration illegals trump intv lemon ctn bts_00001515.jpg
jan brewer immigration illegals trump intv lemon ctn bts_00001515.jpg
Now playing
03:31
Fmr. Ariz. Gov. Brewer: Everybody knows Trump is right
cnni judge blocks pres. obama immigration _00003018.jpg
Getty Images
cnni judge blocks pres. obama immigration _00003018.jpg
Now playing
01:32
Feds try to block immigration ruling
ac dnt griffin high cost of border drones_00004819.jpg
ac dnt griffin high cost of border drones_00004819.jpg
Now playing
05:18
Border patrol drones 'invaluable' or 'wasted money'?
tsr dnt johns obama texas immigration injunction _00003118.jpg
CNN
tsr dnt johns obama texas immigration injunction _00003118.jpg
Now playing
01:58
Texas judge blocks Obama's immigration action
WASHINGTON, DC - DECEMBER 19:  U.S. President Barack Obama speaks to members of the media during his last news conference of the year in the Brady Press Briefing Room at the White House December 19, 2014 in Washington, DC. President Obama faced questions on various topics including the changing of Cuba policy, the computer hack of Sony by North Korea, his executive action on immigration and his plan on working with a Republican majority Congress.  (Photo by Chip Somodevilla/Getty Images)
Chip Somodevilla/Getty Images
WASHINGTON, DC - DECEMBER 19: U.S. President Barack Obama speaks to members of the media during his last news conference of the year in the Brady Press Briefing Room at the White House December 19, 2014 in Washington, DC. President Obama faced questions on various topics including the changing of Cuba policy, the computer hack of Sony by North Korea, his executive action on immigration and his plan on working with a Republican majority Congress. (Photo by Chip Somodevilla/Getty Images)
Now playing
01:25
TX judge blocks Obama's immigration action
cnni judge blocks pres. obama immigration _00003018.jpg
Getty Images
cnni judge blocks pres. obama immigration _00003018.jpg
Now playing
00:48
Judge blocks Obama's order on immigration
DES MOINES, IA - JANUARY 24: U.S. Sen. Ted Cruz (R-TX) speaks to guests at the Iowa Freedom Summit on January 24, 2015 in Des Moines, Iowa. The summit is hosting a group of potential 2016 Republican presidential candidates to discuss core conservative principles ahead of the January 2016 Iowa Caucuses.
DES MOINES, IA - JANUARY 24: U.S. Sen. Ted Cruz (R-TX) speaks to guests at the Iowa Freedom Summit on January 24, 2015 in Des Moines, Iowa. The summit is hosting a group of potential 2016 Republican presidential candidates to discuss core conservative principles ahead of the January 2016 Iowa Caucuses.
Now playing
04:41
Cruz: President's executive amnesty is wrong
US customs and border patrol
courtesy US Customs and Border Patrol
US customs and border patrol
Now playing
02:54
Is immigration the engine of economic vitality?
sot ernst republican response sotu_00012320.jpg
sot ernst republican response sotu_00012320.jpg
Now playing
01:03
A GOP split on immigration?
cnnee la bestia pkg kay guerrero _00001023.jpg
cnnee la bestia pkg kay guerrero _00001023.jpg
Now playing
01:50
A look inside 'The Death Train'
secure the border lavandera orig jtb_00000130.jpg
secure the border lavandera orig jtb_00000130.jpg
Now playing
01:26
Can we REALLY secure the border?
ac dnt lavandera immigration facts_00003104.jpg
ac dnt lavandera immigration facts_00003104.jpg
Now playing
02:01
Border crisis: Just the facts
(CNN) —  

He served in the US military for six years. But the toughest battle Hector Barajas faced lasted more than a decade.

Barajas was deported in 2004. On Friday, he became a US citizen at a ceremony in San Diego after California’s governor cleared the way for his return.

Barajas has become a well-known leader of an increasingly vocal group of deported veterans, many of whom have made their home across the US-Mexico border in Tijuana.

Whether the US government should deport people who’ve served the country is a debate that sits at the intersection of two major areas in US politics: immigration and the military.

So how did we get here? Let’s take a step back and look at some of the issues at play:

There are immigrants in the US military?

Yes, tens of thousands of them in fact. About 40,000 immigrants serve in the armed forces, according to a report from the National Immigration Forum. Most of them are lawful permanent residents of the United States. And more than half a million US veterans are foreign-born.

Deported veteran Hector Barajas still wears the medals he earned serving in the US military.
Deported veteran Hector Barajas still wears the medals he earned serving in the US military.

Is this a new thing?

Not at all. There’s a long history of immigrants serving in the military. During the Civil War, about 20% of the Union Army’s 1.5 million members were foreign-born, according to the Migration Policy Institute. And immigrants made up more than 18% of the US Army during World War I, according to US Citizenship and Immigration Services. Some units had so many foreign-born soldiers that they became known for their immigrant members, including the 77th Infantry Division, which was known as the “Melting Pot Division.”

So how does a veteran end up getting deported?

Each case is different. But they generally share one thing in common: They were honorably discharged from the military but later convicted of crimes after returning to civilian life.

Barajas, who was born in Mexico and brought to the United States as a child, served in the 82nd Airborne Division from 1995 until he was honorably discharged 2001.

Soon afterward, he was arrested over shooting a gun from his vehicle. Nobody was hurt, but he was charged with assault and pleaded no contest in 2002 to a charge of shooting at an occupied vehicle.

Authorities revoked his green card and deported him after he served a two-year prison sentence. He’s been living in Tijuana and trying to get back to the United States ever since.

And he’s not the only one. Barajas founded a safe house in Tijuana for other deported veterans. Dozens have passed through “The Bunker,” seeking shelter and trying to get back on their feet.

“I want to apologize once more for what got me deported. I’m not proud of the circumstances that led to it,” Barajas said at a news conference after Friday’s citizenship ceremony. “But I am proud of my service and the work that I’m doing today.”

Once they’re deported, what options do they have?

It’s a long road. Many struggle to find jobs in countries they barely know, Barajas says.

Just last month, CNN followed the case of another veteran who’s just beginning the journey. Miguel Perez Jr., who served more than seven years in prison after a felony drug conviction, was deported in March after a legal battle. But he says he’s not done fighting.

“I will continue to struggle, not only for myself, but for other veterans and others who have been separated from their families,” he said.

01:32 - Source: CNN
Deported vet: I would still die for the US (2018)

Barajas has said he didn’t apply for citizenship while in the Army because he assumed military service guaranteed it. Many other deported veterans, he says, thought the same thing.

It’s unclear how many veterans have been deported; officials don’t track that figure. In 2016, an official with the American Civil Liberties Union told CNN the organization had connected with 70 deported veterans scattered all over the world. On Friday, the ACLU said Barajas is the first known deported veteran to be naturalized as a US citizen.

It took years for Barajas to get back on a path to citizenship. Last year, California Gov. Jerry Brown pardoned him, paving the way for Barajas to return to the United States.

Over the years there’s been