In the 1990s, William Barr, President Trump's pick for attorney general, oversaw a program that sent some 12,000 Haitian asylum seekers to Guantanamo Bay, effectively creating what one detractor called "the world's first HIV detention camp." After operating for about 18 months, the detention system was forcibly ended by a judge in 1993, but Barr defended the practice as recently as 2001.

At the time, Barr was serving as attorney general for President George H.W. Bush, and a military coup in Haiti had led to mass executions that targeted thousands of supporters of the overthrown leader. The bloodshed sent thousands of Haitians fleeing to Florida to seek asylum.

But soon the United States Coast Guard began intercepting the boats at sea and conducting preliminary screenings of the refugees on board. Those who didn't make it past the initial interview were immediately sent back to Haiti. When that practice was challenged in court, the Coast Guard quickly ran out of room to house the would-be migrants aboard ships. Federal immigration officials, wanting to avoid an influx of thousands of Haitian refugees in the U.S., instituted a policy of shuttling them to the U.S. naval station at Guantanamo Bay, Cuba, rather than the States.

A return to Haiti was a near certain death sentence for many of those who fled, said Ira Kurzban, an attorney and refugees' advocate who in 1991 fought against the program. The Haitian military would regularly patrol neighborhoods on the island, "literally pulling people out their homes to execute them in the streets," Kurzban said in a telephone interview with CBS News on Friday.

Those who made it to Guantanamo would go through a "credible fear" interview to determine whether they had a strong asylum case. Those who passed were eligible to enter the United States and begin asylum proceedings.

But Haiti was also going through an AIDS crisis and some refugees were HIV-positive. Those who tested HIV-positive were forced to undergo a second interview at Guantanamo Bay and questioned again, facing a higher standard for proving their eligibility for asylum, according to a law paper published by Michael Ratner, the attorney who successfully fought against the HIV screening. Ratner died in 2016. The paper, titled "How We Closed the Guantanamo HIV Camp: The Intersection of Politics and Litigation," was released by the Harvard Human Rights Journal in 1998.

In Ratner's brief, he wrote that a "high-level attorney in the Bush administration told us that Attorney General Barr believed that everyone who was HIV-positive should be returned to Haiti."

The process effectively segmented off the HIV-positive asylum seekers and held them indefinitely at Guantanamo Bay, a military base where they weren't protected under any sovereign laws, including those of the United States. The system created "the world's first and only detention camp for refugees with HIV," according to Ratner's paper.

Aaron C. Morris, the executive director of Immigration Equality, an immigration rights organization focused on LQBTQ issues, called the program an effective "prison camp" and "a stain on United States history."

"William Barr's embrace of those inhumane camps as well as his leading role in fighting to ban immigrants living with HIV from entering the country is appalling," Morris wrote in an email to CBS News.

The system occasionally put Barr at odds with then-Chairman of the Joint Chiefs of Staff Colin Powell, Vice President Dick Cheney and National Security Adviser Brent Scowcroft, all of whom didn't understand why a military base was being used for immigration purposes, according to an interview Barr gave in 2001 with the Miller Center, a presidential research center at the University of Virginia.

The three often asked how much longer "the HIV people" would stay, Barr said, to which he responded: "Until it's over."

"But we're not bringing these people into the United States." Barr recounted saying at the time. "This is a very convenient base outside the United States, and it's serving a good function."

While Barr said "politics was not the reason we were doing this by any means, because we were enforcing immigration laws," he did acknowledge the political undercurrents. "You want 80,000 Haitians to descend on Florida several months before the election? Come on, give me a break," Barr said in the 2001 Miller Center interview, which was intended to be an oral history of the George H.W. Bush administration.

Barr did not respond to an email from CBS News seeking comment.

Unlike detention centers in the U.S., access to immigration attorneys at Guantanamo Bay was limited and "refugees could not apply for the protection of political asylum until they set foot in the United States," according to Ratner's brief.

In the end, Ratner credits a combination of legal challenges and public pressure from high-profile activists with finally ending the policy. In 1993, District Court Judge Sterling Johnson Jr. ruled in the migrants' favor, stating that they were being held in "the kind of indefinite detention usually reserved for spies and murderers," even though they "are neither criminals nor national security risks ... merely the unfortunate victims of a fatal disease," the Washington Post reported. The Clinton administration, which by then had taken office, chose not to appeal further. At that point, Ratner says there were fewer than 150 Haitians still detained at Guantanamo and they were allowed to enter the U.S.

"It's a shameful chapter of history because the United States kept these people in prison, denying them their legal rights to receive legal processing because [Guantanamo] is not a U.S. territory," said Muzaffar Chishti, the director of the New York Migration Policy Institute office, in a telephone interview with CBS News.