Uighur men pray together in Bermuda in 2009 days after being released from Guantánamo.Brennan Linsley / AP

They arrived at the American detention center in Guantánamo Bay, Cuba—where, as Defense Secretary Donald Rumsfeld put it, the “worst of the worst” would be held—a few months after 9/11, directly from Bagram Airfield in Afghanistan. There were 22 of them, all men, all of them Muslim, bearded, ranging in age from their early 20s to their mid-40s. Five had been captured by American forces following a battle in northern Afghanistan, and the other 17 were seized by police in Pakistan.

But there was something different about these detainees: All were members of China’s Uighur minority, a Turkic group chafing under Beijing’s tight control of their ancestral home in Xinjiang, northwest China. Uighurs had not been known to have harbored anti-American sentiments, much less to have participated in terrorist attacks against Western targets. None of these men, for example, appeared to have fought in any of the past jihadist battlegrounds—not in Afghanistan itself during the Soviet invasion, nor ir Bosnia or Chechnya. And yet, despite the lack of evidence against them, the Bush administration for years resisted legal efforts to free these Uighur prisoners, some of them remaining among “the worst of the worst” for 12 years, until, finally, they were released.

The Uighur community is now in the news again, albeit in a very different way—as victims of what is widely regarded as China's worst human-rights violation since the days of Mao Zedong. Reports filtering out of the country over the past few months indicate that a million or more Uighurs have been locked up in “transformation through education centers,” which are basically concentration camps constructed in various parts of Xinjiang. Detaining the Uighurs is part of China’s long-term effort, stretching back decades, to impose its will on the region and combat what it calls “Uighur terrorism.”

The United States today is not buying that justification, with senior Trump-administration officials, including Vice President Mike Pence and Secretary of State Mike Pompeo, publicly criticizing Beijing for its oppression of the Uighurs. Most recently, Pompeo has accused China of "being in a league of its own when it comes to human rights violations." The two countries are engaged in a series of disputes, ranging from President Donald Trump’s frustrations over trade to American accusations that Beijing allows the theft of American intellectual property. But those 22 Uighurs who were held at Guantánamo Bay serve as a reminder of a period when the United States viewed China less as a rising foe and more of a cooperative partner in trade and diplomacy, what analysts called a “responsible stakeholder”—and a moment in time when the U.S. government was complicit in the Uighur repression.

By the time the 22 Uighurs were first taken into American custody in late 2001, there had been a number of Uighur attacks against ethnic Han Chinese in Xinjiang, including bus and market bombings. (There have been more such attacks since, some of them very bloody.) Western scholars of Xinjiang, however, attributed these attacks to mounting Uighur frustration over the mass migration of Han Chinese into their traditional homeland, as well as severe Chinese repression of Uighur discontent, including peacefully expressed frustration. China itself for a long time treated its Uighur problem as a local matter, not a product of international jihadism fomented abroad. But after 9/11, the Chinese government began to portray Uighur violence—indeed, Uighur dissent in general—as of a piece with al-Qaeda-style terrorism, an effort widely seen by human rights advocates and others as a way of justifying its repression.  China blamed a group called the East Turkestan Islamic Movement (ETIM) for troubles in Xinjiang, portraying it as an affiliate of al-Qaeda, a claim which has been debated.

For a while, the U.S. declined to accept China’s view of the group. Two months after 9/11, Francis X. Taylor, the coordinator for counterterrorism at the State Department, went to Beijing to further what he called at the time “a robust, multifaceted, and evolving partnership.” Asked by journalists about ETIM, though, Taylor replied that the problems in Xinjiang stemmed from local grievances and could not be dealt with by using “counterterrorism methods.” In March 2002, an assistant secretary of state, Lorne Craner, said while introducing the State Department’s annual human-rights report that China had “chosen to label all of those who advocate greater freedom in [Xinjiang], near as I can tell, as terrorists. And we don’t think that’s correct.” That rhetoric would not last.

In their first meetings with American interrogators in Afghanistan, before their shipment to Guantánamo, the Uighur prisoners made no effort to hide what was later deemed an incriminating fact about them: Later court documents, as well as interviews conducted after their release, show that some of the 17 who had been arrested in Pakistan said that they had spent time in a village in Afghanistan near the Tora Bora mountains, a region that later became well known as Osama bin Laden’s initial place of refuge. They said that they had gotten training on small arms and Kalashnikov rifles while they were there, and acknowledged meeting a man named Hasan Mahsum, who founded ETIM.

Some of the prisoners readily acknowledged in that initial questioning a hatred for China because of its oppressive policies in Xinjiang, but said that they felt no animus toward the United States. Others said that they were merely members of the Uighur diaspora, who can be found in many of the countries of central Asia—there are estimated to be about 300,000 of them in  Uzbekistan and other Central Asian countries. One of the men making that claim, Abu Bekir Qasim, a 45-year-old from the northern Xinjiang town of Ghulja, told me in a Skype interview that he left the province in 2000, going first to Kyrgyzstan before heading to Pakistan, from which, like many Uighur exiles, he hoped to make his way to Turkey. Upon arriving in Pakistan, Qasim learned that he would have to wait in the country for at least two months to get a visa to travel through Iran, and Pakistan was expensive. “Many Uighur refugees told me about a village in Afghanistan where you don’t have to pay for lodging or food and can stay for a couple of months,” he said. “It seemed like a good idea.” He and another man walked across the Pakistan-Afghanistan border at the Khyber Pass and took a bus to Jalalabad before setting off on a three-hour drive to what Qasim and other Uighurs knew as “the Uighur village.” In court filings, American government attorneys referred to this village as a terrorist training camp “affiliated” with al-Qaeda and the Taliban.

I asked Qasim about the village, the paramilitary training, and Mahsum's presence. He told me that there were many Uighurs there, and their mere presence alone did not make them members of ETIM, much less enemies of the United States. Qasim said that Mahsum, who was reported killed by the Pakistani army in 2003, may sometimes have been there, but he insisted that this did not mean every Uighur present was a follower of his or a member of his organization. As for small-arms training, he said, weapons were ubiquitous in Afghanistan and everybody was expected, as a condition of their stay in the village, to know how to use them.

Initially, American interrogators believed Qasim and his compatriots. During the Uighur detainees’ first year at Guantánamo, reports filed by interrogators found most of them not to be “enemy combatants,” and they were deemed eligible for release. For reasons that have never been made clear, though, they were not released—very likely, this was initially because there was no place to release them to, then because, except for a small number of them, the Bush Administration simply refused to let them go. Rushan Abbas, who had been a reporter for Radio Free Asia in Washington and who subsequently spent months in Guantánamo as the interpreter for the Uighurs, told me that Major General Michael E. Dunlavey, the commander of the task force responsible for interrogating the prisoners in Guantánamo’s early days, had said to her that he’d felt the Uighurs were being detained in error. Years later, he emailed her: “Every time when I read about how our government screwed up the release of the Uighurs, I feel very angry.” Multiple attempts to contact Dunlavey were unsuccessful, but those remarks are consistent with a statement he has reportedly made about Guantánamo detainees.

In Qasim’s case, a review by what was called the Joint Task Force Guantanamo, dated February 21, 2004, which was among a full set of such memos published by WikiLeaks, acknowledges Qasim’s “prior assessment” as “not affiliated with al-Qaeda or a Taliban leader.” But, it continues, “new information” indicated that Qasim “is a probable member” of ETIM, which “is a Uighur separatist organization dedicated to the creation of a Uighur Islamic homeland in China, through armed insurrection and terrorism.”

In describing ETIM in those words, officials echoed the portrayals of Uighur “terrorists” that Chinese propaganda had been disseminating. The United States had also been  incorporating this sort of language into its official statements. In late 2002, reversing its earlier resistance, the State Department designated ETIM as a terrorist organization. A fact sheet on this decision described ETIM as a “violent group believed responsible for committing numerous acts of terrorism in China, including bombings of buses, movie theaters, department stores,” and other targets. Between 1990 and 2001, it continued, “members of ETIM reportedly committed over 200 acts of terrorism in China, resulting in at least 162 deaths and over 440 injuries. Its objective is the creation of a fundamentalist Muslim state called ‘East Turkistan.’”

This statement repeats figures included in a document issued by China’s State Council, the country’s main governing body, in which China publicly laid out its case against ETIM and other Uighur radicals it blamed for violence in Xinjiang. Missing from the State Department fact sheet, and from other statements of the United States’ position, was any echo of Washington’s previous views—that Uighur grievances were local and could not be dealt with by counterterrorism methods, or that China made no distinction between those perpetrating violence and those advocating for greater freedom. In the post-9/11 frenzy, and in its eagerness to enlist Beijing’s support in the wider War on Terror, the United States had adopted China’s position without qualification.

Moreover, whether China’s description of ETIM was  accurate or not, it would say nothing about whether the Guantánamo Uighurs were members of the group. When the Bush administration was called upon to make the case that the prisoners were members of ETIM, it also presented evidence that appears to have been generated by China. In 2008, a group of the Guantánamo Uighurs, arguing that “there was not one iota of actual evidence” connecting them to any terrorist organization or act, was able to bring a habeas-corpus suit to the U.S. Court of Appeals in Washington. The government’s lawyers put a cache of classified documents into the record, ostensibly to show that the men were indeed enemy combatants. This material has never been made public. The court, after reviewing the documents, not only overturned the government’s enemy-combatant finding, but also dismissed in derisive terms the evidence presented by the U.S. government, describing it as Chinese propaganda. Judge Merrick Garland, who wrote the unanimous opinion of the three-judge panel, noted that the government’s case rested on four “intelligence documents,” which were themselves full of words and phrases like “reportedly,” or references to “things that ‘may’ be true or are ‘suspected of’ having taken place,” with no indication of who “‘reported’ or ‘said’ or ‘suspected’ those things.”

The classified documents were so similar that they seemed to have a “common source,” which he said was “the Chinese government, which may be less than objective with respect to the Uighurs.” In a separate case several months later,  a U.S. district court ordered that the Uighurs detained at Guantánamo be released into the United States. But the Bush administration succeeded in getting that order reversed, and so, except for five of the Uighurs captured in Pakistan, including Qasim, who had been released to Albania in 2006, the others remained at Guantánamo.

The Obama administration accepted that the Uighurs still being held at Guantánamo posed no danger to the United States, and proposed to resettle them in Northern Virginia, where there was a Uighur American community ready to take care of them. But this effort died in the face of vociferous opposition from the Republican representative Frank Wolf and former House Speaker Newt Gingrich, both of whom, consciously or not, based their objections on the same Chinese assertions that the government had depended on earlier. Wolf called the Uighurs “these terrorists” who were “members of the East Turkestan Islamic Movement, a designated terrorist organization affiliated with al-Qaeda,” while Gingrich warned that the Guantánamo Uighurs had been “instructed by the same terrorists responsible for killing 3,000 Americans on September 11, 2001.”

By the end of 2013, the remaining Uighurs had been released from Guantánamo and sent to a variety of different countries. According to Abbas, the former translator for the Uighurs who has remained in contact with many of them, even now they try to keep their whereabouts a secret, worried that Beijing will pressure their host countries to send them back to China.

Their imprisonment had been part of an effort by the United States to gain cooperation in the War on Terror. Instead, China won American cooperation in its war against the Uighurs.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.