A U.S. citizen and former refugee, who was put in deportation proceedings years ago, has finally returned to the country from Cambodia.

Sok Loeun, who had first arrived in the U.S. legally with refugee status, landed in San Francisco last Wednesday after spending five years in Cambodia.

When Customs and Border Protection started the proceedings in 2015, prompted by an old drug conviction, Loeun had actually been a citizen for almost two decades, unbeknown to him at the time. When he was threatened with deportation, he self-deported because of what advocates call a "massive" administrative oversight error and a "failure at every level."

According to Anoop Prasad, a lawyer with Asian Americans Advancing Justice — Asian Law Caucus, who facilitated his return, Loeun is the third person to return from Cambodia after having mistakenly been put in deportation proceedings.

"The United States, of course, may not deport its own citizens, but it happens far too often," he told NBC News. "As long as the United States follows mass deportation policies, we know this will continue to happen."

Roughly 75 people, including Loeun's family members, showed up at San Francisco International Airport with signs and drums to welcome him back.

Prasad said Loeun had been denied admission back into the U.S. and detained by CBP following a trip to Cambodia in 2015. The agency seized his green card and served him with a notice to appear for his deportation proceedings because of a felony marijuana conviction.

"He, at that point, was obviously really scared. He'd seen other folks, others in the Cambodian community, get detained for months and years and then get deported with nothing but the clothes on their backs," Prasad said. "He decided, rather than risking being arrested or detained, he was just going to self-deport. His rationale was, you know, he's a single parent with three kids. He didn't want to put them through him being locked up for a really long period."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

CBP declined to comment.

Loeun, who was born in a refugee camp in Thailand, had already been a U.S. citizen for years. Under a Clinton-era rule, foreign-born children automatically acquire citizenship if they are under 18 years of age and have a parent who is naturalized or is a U.S. citizen by birth. Because Loeun's mother became a citizen in 1996, he met the requirements.

In 2018, an attorney with Immigration and Customs Enforcement acknowledged that Loeun "might be a U.S. citizen" during his removal proceedings in court, in which he was not in attendance. NBC News has heard the court recording. The attorney requested the case be terminated "in the abundance of caution," which the judge honored.

Though his case was thrown out, Loeun was never actually contacted about the news. It wasn't until he attended an immigration workshop in Phnom Penh in November that Prasad quickly figured out that Loeun was indeed a U.S. citizen who never should have been put through deportation proceedings.

While Loeun's particular case may be rare, Prasad said, "There is nothing unusual about the pain he went through, and it's the same pain that other Cambodian families separated by deportation, war and genocide go through."

"The long-term solution to reuniting families is for the United States to amend its deportation agreement with Cambodia," he said.

Many more in the Cambodian community, most of whom arrived in the U.S. as refugees, have been targeted in ICE raids. In the past two fiscal years alone, the deportation of Cambodian immigrants has increased by 279 percent. The agency deported the year's first group of Cambodian immigrants in January.

Advocates have been calling for reforms to the U.S. immigration policy toward these deportations. In October, hundreds of protesters across the country demonstrated against the administration's continual raids in the community. Many have demanded a renegotiation of the memorandum of understanding between the U.S. and Cambodia.

Under the 2002 agreement, Cambodia consented to taking in a limited number of deportees — an act that was met with a great deal of resistance from the Cambodian American community, which raised humanitarian concerns around the repatriation of refugees.

The Cambodian government cut back on the deportations, halting the issuance of travel documents altogether in August 2017. However, the U.S. government retaliated.

"Repeatedly, the United States has refused to consider a more humanitarian agreement and instead responded by bullying Cambodia with sanctions," Prasad said before referring to others who have also been mistakenly deported. "Future administrations must renegotiate the agreement to ensure that no one else has to go through the pain that Sok, Phorn Tem, Veasna Meth and hundreds of others have."

While the Cambodian government has since regularly been issuing the necessary documents for deportations, the country remains on the list of handful of countries that ICE considers "recalcitrant" or uncooperative in issuing travel documents the U.S. requires for deportation.

Loeun, who remarried and had a child in Cambodia, faces filing fees for his U.S. passport, as well as expenses to bring his wife and daughter to the U.S.

But for now, "Sok is overjoyed to be home in California with his family," Prasad said. "He remains committed to fighting to reunite other deportees he met with their families."