Ever since the Trump administration unveiled the latest edition of its travel ban on Sept. 24, many observers have been puzzled by the inclusion of Chad on the list. Chad was not previously known as a major source of anti-U.S. terror plots, at least no more than several countries that aren’t on the list, and is in fact considered an important regional counterterrorism partner of the U.S. We now know the answer—and it’s very dumb.

CBS reports that as part of its security review of traveler vetting procedures, the Trump administration had required countries to provide a sample of its passports to the Homeland Security Department for analysis. That was a problem for Chad, because the country had run out of passport paper:

Lacking the special passport paper, Chad’s government couldn’t comply, but offered to provide a pre-existing sample of the same type of passport, several U.S. officials said. It wasn’t enough to persuade Homeland Security to make an exception to requirements the agency has been applying strictly and literally to countries across the globe, said the officials, who requested anonymity to discuss disagreements within the administration.

This was why the U.S. was willing to spurn a country that has hosted U.S. organized military exercises and is a major recipient of U.S. security aid, a move that might have contributed to Chad’s recent decision to withdraw hundreds of troops from neighboring Niger, where they had been part of the coalition fighting Boko Haram and where, as recent events make clear, the U.S. needs allies.

The issue is moot, for the moment, as the ban has been blocked by a federal court injunction just like its predecessors. But it should shred whatever remaining credibility the administration has in the criteria it uses to assemble these lists.