(CNN)He served in the US military for six years. But the toughest battle Hector Barajas faced lasted more than a decade.
A deported veteran just became a US citizen. Wait ... what?
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:
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.
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."
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."
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.
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 legislation proposed to help bring deported veterans back to the United States, but it hasn't gained enough support to pass.
In October, the Pentagon announced two changes for immigrants in the military:
• Lawful permanent residents now have to complete background screenings before they're allowed to begin active, reserve or guard service. Before, they were able to ship to initial military training if background checks had started.
• Foreign nationals now have to serve at least 180 consecutive days of active duty service or complete a year of reserve service to be eligible for expedited naturalization. Previously, they were eligible after one day of service.
And the future is uncertain for immigrants who were recruited as part of a program that fast-tracked citizenship for certain foreigners in the military with special skills.
The Deferred Action for Childhood Arrivals program gave deportation protection to more than 700,000 young undocumented immigrants who came to the United States as children. And hundreds of them enlisted in the military.
Defense Secretary James Mattis has said they shouldn't worry about getting kicked out of the United States, even after the Trump administration put the program that protects them from deportation on the chopping block. As of July, according to the US Citizenship and Immigration Services, there were 820 DACA recipients who either were serving in the military or had signed contracts to serve.
For a year, he plans to keep living in Tijuana and making sure his Deported Veterans Support House will stay afloat. Then he'll return to the United States.
"My dream is to put my daughter through college, find a job, continue to help others, maybe go to college," he said. "But my biggest dream is to see all my brothers and sisters go home to the country they're willing to die for."
On Friday, Barajas said he was looking forward to spending time with his family north of the border.
But, he said, there's one thing he intends to do first: register to vote.