This photo made available by Amal Eldarat shows Kamal Eldarat, left, and his son Mohamed Eldarat. Detained in the United Arab Emirates since August 2014, the two were acquitted Monday of charges they illegally raised funds for a foreign entity . (Family photo/via AP)

Two U.S. citizens whose imprisonment in the United Arab Emirates had drawn criticism from human rights groups and the Obama administration were acquitted Monday on charges that they supported militants in Libya, according to their family.

Kamal Eldarat, 59, and his son, Mohamed Eldarat, 34, were not immediately released, but taken back to prison following the verdict in the UAE’s highest court, said Amal Eldarat, the daughter and sister of the defendants. She had heard of the ruling in a call from a U.S. Embassy observer in the courtroom.

“It could take a few days for paperwork and the administrative process,” she told reporters in a conference call. “Some people can stay for up to three weeks, or a month, and there are some cases where they leave within the same day.”

Gregory B. Craig, a Washington lawyer representing the ­Eldarat family, said they were relieved at the verdict but concerned over the continued ­detention.

“We don’t know if it’s a violation of the court order by security police or if it is a transition,” he said. “It should be resolved quickly. We hope it will be.”

According to Amal Eldarat, two other defendants who had been caught up in the same security sweep in 2014 also were acquitted Monday — Salim Alaradi, a Libyan Canadian, and a Libyan national whose family has not publicized his case.

“We welcome the court’s decision, and we are pleased the Eldarats will be reunited with their family soon,” said Mark Toner, a State Department spokesman.

The Eldarats had been detained for 21 months, and their family said they confessed to various crimes after being subjected to torture, including beatings, waterboarding and electric shock. Their prosecution was condemned by human rights groups, and the United Nations special rapporteur said he found credible evidence that they had been ­tortured.

But UAE officials denied that the men had been mistreated and said they received due process.

Prosecutors charged the Eldarats under the UAE’s 2014 Anti-Terrorism Law with providing financial and material support to armed terrorist groups in Libya, but those accusations were dropped in March. They still faced up to 15 years in prison, however, on charges that they gave supplies to groups in a foreign country and did not have official permission to collect donations.

The Eldarat case has strained relations between the United States and a Persian Gulf country that is a U.S. ally in the international coalition fighting Islamic State militants in Syria and Iraq. The State Department and White House both raised the case with UAE officials.

On Friday, Toner expressed concern about the health of the two Eldarats, the allegations of mistreatment, and the many months they spent with no
access to lawyers and no regular visits from officials at the U.S. Embassy.

“Without their support, I don’t think we would have had the attention to this case that it got,” said Craig, their attorney.

The Eldarats are Libyan American businessmen who had lived and worked in the UAE for two decades with no problems.

According to Amal Eldarat — who mounted a lobbying campaign for their release — the father and son were targeted because they took aid to the country of their birth during the 2011 Arab Spring uprising there. Her father had moved to the United States seeking political asylum when dictator Moammar Gaddafi was in power. He and his family returned to their ancestral city of Misurata when the country rebelled against him.

But the UAE government supported forces on the other side of the civil war that convulsed Libya after Gaddafi’s fall and death. Within days after the UAE sent its warplanes to Libya, 10 men with Libyan roots were rounded up in the UAE, the Eldarats among them.

Scholars say the UAE took an aggressive approach to alleged Islamist extremism after the Arab Spring and compiled a list of banned terrorist groups, including some organizations that operate freely in the United States and Europe. The ­government also has cracked down on residents peacefully advocating democratic reform, according to human rights groups and the State Department’s annual human rights ­report.

“From the very beginning of this case, the Eldarat family has taken the position that has now been ratified by authorities, that Mohamed and Kamal Eldarat ­engaged in no wrongdoing, ­committed no crimes, were innocent, and were victims of a grotesque injustice,” Craig said.

Amal Eldarat said she does not know whether her brother and father plan to stay in the UAE, but she said her brother has told her that upon release he wants to go to Shake Shack at Grand Central Station in New York.