Nothing, not the threat of deportation, not the ensuing 10-year legal battle, not even six years in the Batavia detention center, made Carlos Garcia waver.

Even while representing himself – he didn’t get a lawyer until a federal appeals court appointed one eight years into his case – he never gave up on his dream of becoming a U.S. citizen.

Three weeks ago, federal immigration officials finally relented and, after a decade-long battle to deport Garcia, reversed themselves and agreed to grant him citizenship.

“This is the greatest country in the world,” Garcia said after getting the news. “It was a long struggle to secure my citizenship, but I never gave up hope because I truly felt that I was a U.S. citizen and the court would recognize this also.”

Garcia’s story starts in the Dominican Republic, where he was born and lived until he was 5 years old and his parents immigrated to New York City as lawful permanent residents.

His problems started when several run-ins with the law, including a firearms conviction, came to the attention of immigration officials and prompted them to begin deportation proceedings.

Garcia’s criminal history also allowed the government to detain him at the federal facility in Batavia until his deportation case could be decided.

From the start, Garcia claimed he was a “derivative” citizen because he was still under 18 and in his father’s custody when his father became a naturalized U.S. citizen in 1996.

The courts initially disagreed and found instead that his parents’ divorce in the Dominican Republic had raised questions about which parent had legal custody over him.

“The issue was deceptively simple,” Timothy W. Hoover, who represented Garcia in the final years of his case, said of the 10-year legal battle that ensued.

In the end, the courts agreed with Garcia, and immigration officials followed suit last week by issuing the piece of paper he had waited 10 years for - his certificate of U.S. citizenship.

Garcia, 34, could have given up at any point during his six plus years at Batavia and settled for deportation and, freedom, in the Dominican Republic.

Instead, he chose to fight for his citizenship and the right to stay in the country he had considered home since arriving here nearly 30 years ago.

“It is the only country I have known as home,” he said in a statement. “My mother lives here. My sister lives here with her family. Until his passing, so did my father. There is nowhere else where I could think about living.”

Garcia’s legal battle with the government is highly unusual, not so much because of his ultimate success, but because of his willingness to take on, and continue, the fight for so long – and to do it alone without a lawyer for the first eight years of that fight.

“Carlos stayed the course, felt he was right and ultimately was successful,” said Hoover, one of the Buffalo attorneys who represented Garcia.

For Hoover, the Garcia case is extraordinary on many levels.

First, there’s the fortitude his client showed in pressing his claim for citizenship, insisting at every step of the way he was right.

Second, it’s a tribute to a federal court system that never gave up on Garcia’s legal challenge and ultimately found reason to believe him, Hoover said.

And last, he considers it a prime example of why lawyers do pro bono work.

“This was the place he always called home,” Hoover said of his client. “Carlos truly believed he was a U.S. citizen, and he was vindicated.”

Immigration lawyers will tell you that Garcia’s case is unusual for the time he spent in custody and the time it took to resolve his case. And they also will tell you that both are because of Garcia’s perseverance.

“Is it unusual to spend 6½ years in Batavia?” asked Matthew L. Kolken, a well-known Buffalo immigration lawyer. “It is unusual because most people won’t or can’t fight that long.”

Kolken said it’s not uncommon to see immigration cases that last up to two years before a decision is made and that many defendants spend much, if not all, of that time in custody at the Federal Detention Center in Batavia.

More often than not, he said, defendants facing a long court case will opt for freedom, even if it means deportation.

“They hold the key to their own cage,” Kolken said.

But not Garcia. He chose to stay and fight. And he ultimately won.

One of the keys to his unlikely triumph was the 2nd Circuit Court of Appeals, which saw merit in Garcia’s claim, and named Hoover and Peter C. Obersheimer as his pro bono counsel in May 2011.

That December, the two lawyers persuaded the court to rule in Garcia’s favor and, in doing so, overturned a lower court ruling that denied his request for citizenship.

That same night, he was released from Batavia. =“We always felt we had a strong case,” Hoover said, “but that doesn’t guarantee success.”

That finally came last month when the Department of Homeland Security decided Garcia is, in fact, a U.S. citizen.

Obersheimer, one of the Phillips Lytle lawyers who worked on the case, said he phoned Garcia at his home out of state with the good news. Garcia didn’t believe him at first. “He asked me to repeat it to him,” Obersheimer said. “I could tell he was clearly choked up. He said there were tears on his end.”

For Garcia, who first made his request for citizenship in 2003, it was one of those rare righteous moments in an otherwise brutal 10-year legal battle.

“I am overwhelmed with joy,” he said. “I am thankful to all those who have assisted me in this long, challenging journey.”