A Florida man born in Philadelphia has filed a lawsuit alleging Immigration and Customs Enforcement detained him for weeks and prepared for his deportation to Jamaica, despite numerous documented complaints that he was a U.S. citizen and had only been to the island nation once on a one-day stop on a cruise years ago.

Peter Sean Brown, who filed the lawsuit Monday, had turned himself in to the Monroe County Sheriff’s Office in April for a probation violation after testing positive for marijuana. But rather than being released a few days later or given a court date, according to the lawsuit, he was handed over to ICE and mocked by agents who refused to listen to his protestations. When he was finally released 22 days later, he had lost his job at his job at a Key West, Florida, restaurant.

According to the Washington Post, Monroe County is one of a dozen Florida counties that entered an agreement with ICE in which ICE promised to compensate sheriffs financially for holding “criminal aliens” already in their custody for ICE to pick them up. The ACLU, which with the Southern Poverty Law Center and the Los Angeles-based law firm Gibson, Dunn & Crutcher has filed the suit for Brown, has contended that the agreement violates basic policing principles that will sweep up citizens like Brown and expose them to unjust and lengthy detentions.

The lawsuit, filed in the U.S. District Court for the Southern District of Florida, accuses Richard Ramsey, the sheriff of Monroe County, of unlawfully arresting and detaining a U.S. citizen.

According to Brown’s lawsuit, when he was booked in the county jail, his fingerprints were sent off to the FBI to verify his criminal records. Those fingerprints reached ICE, which sent the sheriff a detainer request asking his office to hold Brown. Officers told a confused Brown that he was going to be deported to Jamaica—a country where he knew no one—and he protested that he was a U.S. citizen and offered to provide a birth certificate as proof. He had his friend call the jail to tell them they were holding the wrong person, but the jail told the friend to relay the information to ICE, and the officers told Brown they would hold him on retainer regardless of whether he produced a birth certificate. According to the lawsuit, the inmate file maintained by the sheriff would have confirmed that Brown was born in the U.S.

Brown continued to plead with officers to look into his citizenship, but the officers mocked him, according to the lawsuit. He filed a series of written complaints, but a lieutenant told him, “it is not up to us to determine the validity of the ICE hold,” the complaint alleges. When he eventually went to court, the judge ordered the end of his detention for the probation violation, but the sheriff’s office arrested him again and returned him to the jail for the ICE request, according to the complaint.

More than three weeks after he was booked, Brown was transferred to ICE custody and taken to the Krome immigrant detention center in Miami. There, he told the agents he was a citizen, and they agreed to look at his birth certificate. His roommate emailed the document, and ICE finally released him, only after confiscating all the documents they had given him to do with his impending deportation, according to the lawsuit.

Earlier this year, the Los Angeles Times reported the case of a U.S. citizen who was held for more than a year in an ICE facility. The paper’s investigation found that ICE had released more than 1,400 people from custody since 2012 after investigating their citizenship claims.