Brazilian national Fabiano de Oliveira — free and home after a month in immigration detention — says that being arrested as he tried to get a green card for marrying the mother of his child has not deterred his faith in America.

“I still have the American dream to be successful,” de Oliveira, 33, told the Herald yesterday. “We cannot have the life we have here down there (Brazil). My son is not going to have the education. His chances here are way better.”

De Oliveira spoke in his Beverly home, with his American wife, Karah de Oliveira, 27, at his side. The couple have a 5-year-old son, who was born in America.

Fabiano de Oliveira was released Friday from the Plymouth County Correctional Facility, where he had been detained since Jan. 9.

While in jail, de Oliveira shared a cell with four other men who were facing deportation.

When he lost his freedom, de Oliveira said it was difficult to be without his family while not knowing when his next court date would be. He said undocumented immigrants facing deportation need to look to a higher power.

“Pray. That’s what kept me calm and very strong all this time I was in jail. … You see how people get stressed out in there. The Bible and God. That’s what helped me.”

De Oliveira’s attorney, Jeffrey Rubin, said his record is almost spotless, with one blemish that included a driving without a license infraction.

The Herald reported last week that under President Trump, undocumented immigrants from the Bay State without criminal records are being arrested at more than three times the prior level. ICE data shows during fiscal year 2017 — from October 2016 through September 2017 — 1,106 illegal immigrants without records were administratively arrested. At least 919 of those arrests occurred after Trump took office. During fiscal year 2016, 343 undocumented immigrants without criminal records were arrested.

Rubin said his client was released on his own recognizance and has to check in periodically with ICE. De Oliveira wears a GPS bracelet on his right ankle. Rubin negotiated de Oliveira’s release by striking a deal with the U.S. attorney’s office in Boston and federal immigration officials in Washington, D.C.

“We spent a month watching this family suffering in misery. But they are overjoyed and very much back to feeling like a healthy, stable family,” Rubin said.

An ICE official said in a statement: “ICE makes custody determinations on a case-by-case basis, considering all the merits and factors of each case while adhering to current agency priorities, guidelines and legal mandates.”

De Oliveira, a painter, said he and his wife will continue the immigration process. But he knows nothing is guaranteed.

“I’m happy to be home. I hope this nightmare ends soon,” he said. “It’s getting better, but we still have a long way to go. Right now, I’m not sure I can stay here.”