A Salvadoran man with a criminal record decided to heed the advice of the Trump administration and self-deport, his attorney said.

But as he waited to board a flight at San Francisco International Airport bound for San Salvador, he was arrested by federal agents.

After his three weeks in custody, a federal court convicted Jeisson Rony Escobar-Valencia of being in the country illegally after a prior removal, according to court documents, and he is expected to be deported back to El Salvador — exactly where he was attempting to go when he was detained.

His case underscores the complexities of self-deportation as the Trump administration steps up its crackdown on illegal immigrants. This year, the federal government launched an ad campaign urging undocumented migrants to go home.

In May, the Department of Homeland Security said it would pay people $1,000 to self-deport, calling the offer a “historic opportunity for illegal aliens.” Homeland Security Secretary Kristi Noem stated in February that those who are caught in America illegally will never have the chance to return, while those who self-deport “may have an opportunity to return and enjoy our freedom and live the American Dream.”

It’s unclear how many people have self-deported, though Homeland Security has touted the program as a success.

Escobar-Valencia, 30, was brought to the Bay Area at 11 years old by his father, who had obtained temporary protected status due to unsafe conditions in El Salvador, according to court documents. Escobar-Valencia spent the entirety of his adolescent and adult life in the U.S., where he now has a 2-year-old son and 1-year-old daughter, according to documents filed by his attorney, Elisse Larouche.

Escobar-Valencia is a convicted sex offender and was previously deported, but his lawyer said that when he boarded the flight at SFO, he was “trying to do the right thing — leave the U.S. because he did not have legal status here.”

In 2018, Escobar-Valencia was convicted of committing lewd acts with a child under 14 years old.

According to Larouche, he entered a plea deal that he thought would protect him from deportation. It did not, however, and he was deported to El Salvador in May 2021 after spending three years in prison.

Shortly after arriving back in El Salvador, Escobar-Valencia was the victim of an attempted homicide in a neighborhood controlled by the MS-13 gang, according to a police report included in court documents. He jumped out of a moving car after an attacker held a knife to his throat and sliced a 4-inch cut.

After this encounter, Escobar-Valencia feared he would be kidnapped or attacked again, according to Larouche.

“It was in this context that Mr. Escobar-Valencia made the decision to return to the U.S.,” Larouche wrote. “He understands now that he should not have returned, but at the time, he was in extreme fear and made the wrong and unlawful choice.”

Upon his return to America, Escobar-Valencia was arrested in Martinez, Calif., in July 2021 and served four months in jail for failure to register as a sex offender. On Feb. 14, he was arrested in Richmond, Calif., for failure to register as a sex offender and for a bench warrant for failure to appear in court for a felony charge, according to court documents.

In July, he made the decision to self-deport, purchasing his own ticket from San Francisco to San Salvador.

Because he had a criminal record, it is likely immigration officials saw this and took him into custody.

On July 23, Escobar-Valencia arrived at SFO with his bags packed and a ticket for Seat 26A on Avianca’s 2:20 p.m. flight to San Salvador. But when Escobar-Valencia attempted to board, he was apprehended by Immigration and Customs Enforcement agents, according to court documents.

Escobar-Valencia “said goodbye to his family including two young children and partner, and was determined to set up a life in El Salvador where his family could later join him,” Larouche wrote. “Instead, the government intervened to criminally prosecute Mr. Escobar-Valencia, putting him in criminal custody for this case followed by a prolonged period in immigration custody before he can return to El Salvador.”

Escobar-Valencia subsequently entered a plea bargain agreeing to the “virtual certainty of his deportation” in exchange for the swift resolution of his case, according to court documents.

On Aug. 14, Assistant U.S. Atty. Thomas Green told the judge that although sentencing guidelines recommend Escobar-Valencia spend 18 to 24 months in prison, Green supports a one-day jail term on top of time already served in custody, according to reporting from the Mercury News. The short sentence was part of the plea bargain, and the judge approved the deal.

“The defendant is leaving his family, including two young children, and that’s not a small thing for a defendant to be doing,” Green said, according to the newspaper.