Peter Sean Brown was born in Philadelphia.

But when he showed up at a Florida sheriff’s office for violating probation after testing positive for marijuana, he was told he would be detained and flagged for deportation — to the island of Jamaica — based on a request from Immigration and Customs Enforcement, according to a federal lawsuit filed Monday.

Brown repeatedly told officers at the Monroe County Sheriff's Office in Florida that he was a U.S. citizen, and even offered to show his birth certificate, according to the lawsuit filed by the American Civil Liberties Union, the Southern Poverty Law Center, and Gibson, Dunn & Crutcher LLP.

Brown, 50, had been living in Florida for the last decade, according to the suit.

"Despite his repeated protests to multiple jail officers, his offer to produce proof, and the jail’s own records, the sheriff’s office held Mr. Brown so that ICE could deport him to Jamaica — a country where he has never lived and knows no one," the complaint said.

SIGN UP HERE FOR BREAKING ALERTS FROM NBC NEWS

The lawsuit also claims that Brown's inmate file at the sheriff's office indicated he was citizen in multiple places, including listing his place of birth as Philadelphia. That file also showed Brown had a valid Florida driver's license, according to the suit.

Brown's friend and manager of the restaurant where he worked, Brooke Lynch, checked Brown's name in an online inmate locater and discovered he had an ICE detainer request against him, according to the suit. But that detainer allegedly had some discrepancies, according to the suit, listing an incorrect birth date for Brown and indicating he was 7 feet tall when he is 5 foot 7 inches.

During his time in jail, the suit alleges the officers mocked him, one telling him "‘everything’s gonna be alright’ in a Jamaican accent."

When Brown tried to tell officers he was born in Philadelphia, one guard sang to him the theme of the 1990s sitcom "The Fresh Prince of Bel Air," where actor Will Smith raps about being "born and raised" in West Philadelphia.

Brown spent three weeks in jail in April before he was turned over to the Krome immigration detention center in Miami, according to the lawsuit.

"Mr. Brown was terrified that he could be put on a plane at any moment and deported to Jamaica," the suit said.

While he was jailed, Brown filed several formal complaints with Sheriff Rick Ramsay saying he was being falsely accused, according to the suit.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I have been wrongly accused and threatened with deportation from ICE," he wrote in one, according to the lawsuit. "I am and have always been a citizen of the United States."

That complaint also stated that 20 years ago in New Jersey, the predecessor agency to ICE had mistakenly arrested and then released him after they learned he was a citizen, according to the lawsuit.

After Brown was turned over to ICE, agents agreed to look at Brown’s birth certificate as proof of his citizenship, which his roommate emailed over and ICE determined he was in fact a U.S. citizen, according to the suit.

"After confirming that Mr. Brown was a U.S. citizen, ICE hastily arranged for his release from Krome," the suit said. "Before he left, they confiscated all the documents they had given him regarding his impending deportation."

Ramsay said in a statement from the sheriff's office Tuesday afternoon that, "Local law enforcement throughout this country has been caught in the middle of a political argument regarding immigration."

"Although I can’t respond as much as I would like on this case given the pending litigation, I always strive for transparency with the public, which all of us here at the sheriff’s office serve," he said. "This was an unfortunate case of mistaken identity by ICE regarding a subject who was initially in state custody for violating probation for a felony crime of violence against a police officer."

Ramsay said his office was notified in writing by ICE that Brown had a final order of deportation and that his identity had been confirmed via "biometrics," such as fingerprints or other identifying data.

"It is important to also note that when an inmate is held under an ICE matter, I, as sheriff, do not have the legal authority to release that person," he said. "Though the sheriff’s office does not investigate immigration matters and while I cannot release detainees under ICE custody, I immediately took action when notified of this matter months ago."

Ramsay said he ordered the office's detention deputies to "immediately notify ICE of a detainee’s claims of citizenship and to follow up with those claims."

The sheriff's office said in a statement it told Brown about the ICE detainer "approximately three weeks prior to his transfer to a federal detention center in Miami in an effort to give Mr. Brown and his attorney time to resolve the matter."

"Mr. Brown was detained for about 12 hours total on the ICE matter in the Monroe County Detention Center on Stock Island, before he was picked up by ICE," the statement added.

Records provided by the sheriff's office showed Brown was said to have violated probation on a 2016 charge of resisting an officer with violence after testing positive for marijuana and failing to make court payments.

An immigration detainer provided by the sheriff's office indicated ICE checked boxes indicating there was a final order of removal against Brown and that they had "biometric confirmation" of his identity.

ICE did not immediately respond to request for comment.

While ICE is not named in the lawsuit, the case takes aim at the relationship some local law enforcement authorities have with the federal agency. In Monroe County, officials sent Brown's fingerprints to the FBI, which then forwarded those fingerprints to ICE, according to the lawsuit.

The following day, an ICE officer sent a detainer request for Brown, asking that the jail hold him for up to 48 hours beyond the time he would have been released, according to the lawsuit. The sheriff's office agreed to that request and rearrested Brown after he appeared in court on April 26 for his probation violation, despite a judge ordering his release, according to the suit.

The lawsuit accuses the sheriff's office of "carelessly and aggressively" arresting people for ICE under what's known as a Basic Ordering Agreement between the two, where the sheriff's office receives $50 for each individual it holds at ICE's request.

The sheriff's office said in its statement that under the agreement it can hold an ICE detainee for no longer than 48 hours and money from the detentions goes to the county and not the sheriff's office budget.

The suit, which was filed in U.S. District Court for the Southern District of Florida, claims Brown’s Fourth Amendment rights were violated. The Fourth Amendment protects people from unreasonable search and seizure by the government.

Brown's lawyers said his detention caused him to become "severely depressed" and lose his job. The suit asked for the court to award Brown appropriate monetary damages, attorney costs and any other relief the court finds just.

"It’s shocking and not right that somebody can lose their human rights and have all dignity stripped away simply because someone delivers a piece of paper or signs a form," Brown said in a statement released by the ACLU.