A vacationing fisherman says he spotted it sealed inside a bottle, floating off the Florida Keys.

Now the Coast Guard is investigating the two-page note, which is scrawled on a computer printout alongside recent soccer scores.

Its purported authors are a group of Cuban migrants who've been detained on a U.S. Coast Guard cutter for more than a month as their case makes it way through court. The 24 migrants scaled a lighthouse off the Florida Keys last month, and have been at the center of a high-profile legal battle over whether they can stay in the United States.

JUST WATCHED Cubans who climbed lighthouse to be sent home Replay More Videos ... MUST WATCH Cubans who climbed lighthouse to be sent home 00:46

In the message, the letter's authors allege they've been mistreated in detention.

"Please whoever gets this letter make this paper get to the lawyer of the case or someone who can help us please," the letter says.

CNN has not independently verified the authenticity of the letter or the allegations.

Coast Guard spokesman Lt. Cmdr. Gabe Somma released a copy of the document to CNN. The names listed in the letter were blacked out, he said, due to privacy concerns. Somma declined to comment on the letter's authenticity or whether the names in the message matched the names of migrants being held by the Coast Guard.

The U.S. Coast Guard released a redacted copy of a letter purportedly written by Cuban migrants.

"While this was a challenging situation for everyone involved given the extenuating circumstances, we take any report of improper treatment of migrants very seriously," he said. "This matter is currently being investigated."

In a court hearing Thursday, lawyers representing the migrants called for an independent investigation and asked for the opportunity to speak with their clients -- something no one outside the Coast Guard cutter has been allowed to do during the group's detention, which began May 20.

"The desperation of this message, attempting to reach out to lawyers from an incommunicado status on a ship, underscores the lack of due process that was available to the detainees," Kendall Coffey, one of the lawyers on the legal team, told CNN.

Naylis Lopez, an aunt of two detained migrants in the group, said learning about the letter was devastating.

"I feel so bad," she told CNN en Español outside the federal courthouse in Miami Thursday. "I want to scream."

'This is Hell'

The letter, which is written largely in Spanish with a few English phrases, says that the 24 migrants spent a day in the lighthouse before a television helicopter appeared.

A group of Cuban migrants made it onto a platform 40 feet above the water at the American Shoal Lighthouse.

"After this moment, we turned ourselves in to the Coast Guard, where our tragedy began," the letter says in Spanish. "We are 24 people, 2 women, one very sick, we have spent 37 days sleeping on the floor, the food is for dogs, they mistreat us up to the point of violence, and we already have comrades going crazy, this is Hell."

Coffey says he hasn't been able to reach his clients to confirm whether the message came from them, or whether the allegations are accurate. Neither the lawyers working on the case nor the migrants' families have been able to speak with them while they're detained on a Coast Guard cutter, he says.

But the lawyer says several factors lead him to believe it was written by one of his clients.

"The contents of the document are consistent with what a detainee would be writing in this scenario," he says, adding that the names listed in the letter match up with a list he has of some of those detained. The full list of migrants, he said, is something only the government had before.

"We have, of course, basic respect for the government and would not jump to conclusions simply because of one letter," he said. "I think the Coast Guard itself may want to conduct its own inquiries."

In a written statement, Somma said the migrants were held in the "most comfortable conditions possible."

"They were treated with care, compassion and respect during the past five weeks. This was a very challenging situation for both the migrants and our Coast Guard crews as their case was adjudicated," he said. "The migrants were afforded the most comfortable conditions possible given the extenuating circumstances. All migrants receive food, water, clothing, and medical care while onboard our cutters."

The agency's top concern, he said, is "safety of life at sea, regardless of nationality."

"The dangerous waters of the Florida Straits can be unforgiving for the unprepared on ill-advised and illegal voyages," he said. "Immigration policies have not changed and we continue to urge people not to take to the ocean in unseaworthy vessels."

'Is this for real?'

Jason Harrelson says he was on a family vacation, fishing for mahi-mahi about a half mile from the lighthouse Tuesday morning when something caught his eye: an inflated blue surgical glove, bobbing in the distance.

The glove, he says, was attached to a large plastic bottle. The 38-year-old small business owner and stay-at-home dad from Tampa says he pulled the bottle onto his boat, cut it open, and discovered the message inside.

Harrelson says he emailed a copy to his wife, asking her to run it through Google Translate. Some of the details, he says, were still unclear. Then, Harrelson says, he called the Coast Guard, fearing the letter had been written by people who were stranded and needed to be rescued.

"We truly thought there were people in desperate need of help," he says.

The Coast Guard quickly met him and examined the letter. When they left, he says, they took the letter, glove and bottle with them.

Is the story too crazy to be true?

"That's what we thought," Harrelson says. "Is this for real?"

The Coast Guard's quick response and their reaction once they saw the letter, he says, convinced him it was authentic.

And seeing the list of names, he says, also inspired him to contact the migrants' lawyer.

"Coming from Tampa, we know the hardships that Cuban people face every day. ... It made me feel an instant connection," he said. "It makes you want to call and find their families in Florida and say, 'Listen, at least we know they're OK.'"

Now, Harrelson says he's worried reporting the letter to authorities could have repercussions. Questions, he says, are swirling through his mind.

"Did we just hurt these people even more by finding out that this letter got off their ship?" he says. "Are these guys going to be in trouble?"

It's unclear where the migrants are now.

After the judge's ruling Tuesday, the Coast Guard told CNN the group would be processed for repatriation back to Cuba.

But some of them might still have a chance to make it to the United States.

A U.S. immigration screening determined 20 of the migrants have credible fear of persecution, Assistant U.S. Attorney Dexter Lee said in a court filing Thursday . They'll be taken to the U.S. Naval Base in Guantanamo Bay, Cuba, while officials continue to evaluate their case, Lee said.

Four of the Cubans will be repatriated, according to the court filing.

Movimiento Democracia, an organization representing the migrants, has vowed that the legal battle isn't over.

During Thursday's hearing, Judge Darrin P. Gayles said he'd push for the migrants and their lawyers to have a chance to talk as proceedings continue.