In April 2001, a Pakistani diplomat—the first secretary of the Pakistani Embassy in Kathmandu, Nepal, as a matter of fact—was found by the Nepalese police to be stashing a large cache of sophisticated high explosives in his home. Muhammad Arshad Cheema invoked diplomatic immunity to avoid prosecution and, after a short interval, was sent home.

In October 1985, after the hijacking of the cruise ship Achille Lauro in the Mediterranean, an act of open piracy that culminated in the rolling of a disabled man, Leon Klinghoffer, from the vessel’s deck into the sea, the organizer of the “operation” was apprehended and taken into custody by the Italian police. But Abu Abbas was not inconvenienced for long. He was released when he was found to be carrying a diplomatic passport—an Iraqi diplomatic passport as it happened, though he was by nationality a Palestinian and had never been accredited to any overseas mission.

In April 1984, during a demonstration by anti-Qaddafi protesters outside the Libyan Embassy in London, a fusillade of shots fired from inside the embassy struck 12 people. One of them, a police officer named Yvonne Fletcher, was killed. So grave was the incident that it led to the breaking of diplomatic relations between London and Tripoli and to a series of negotiations that only ended when Libya agreed to accept “general responsibility.” But the entire staff of the Libyan Embassy was allowed to return home without let or hindrance.

These cases were far more murky and gruesome, and involved much more serious breaches of local and international law, than the decision of Raymond A. Davis to use deadly force against men he believed to be his assailants in Lahore, Pakistan. Additional murk has resulted from inter-agency incompetence on the part of the United States, which has given discrepant accounts of his no-doubt discrepant job descriptions “in-country.” But this does not in the least alter the main element of the case, which is that Davis is “our diplomat,” in the president’s own words and that the Pakistani authorities have no right either to detain him or to put him on trial.

Even if he were accredited to a country like Portugal or Poland, it would make no difference whether or not Davis was a member of the “special forces,” a CIA agent, or a man working under contract. Nor would it matter whether or not he was using his own name. Even in the case of a deliberate breach of local law, he would be repatriated before it was decided whether or not, or how, to proceed against him. But Pakistan is not a “normal” country. It is a failed and rogue state, where Davis would have had to know that his assailants might very well be working for the forces of law and order. There would be no need for him to be carrying arms if it were not notorious that the Pakistani army and police are the patrons of the Taliban and in league with various criminal and fundamentalist gangs.

A similar observation holds true when the grotesque idea of trying him in a Punjabi court is mooted. This is a country where senior lawyers offered their services for free to the boastful jihadist murderer who had just slain Punjab’s governor Salman Taseer in broad daylight, and where grinning police officers oversee hysterical demonstrations calling for Davis to be hanged (never mind the trial). Prison conditions in Pakistan are of a kind to make Abu Ghraib look trivial: sarcastic letters in the Pakistani newspapers mockingly stress the fact that a shortish stay in such a jail would be near enough to a death sentence anyway.

Not to mince words, then, Davis is a hostage. In addition to the usual sense of the word, he is a hostage to the Pakistani authorities who dare not—even if they wish—make an enemy either of the Islamist mobs or the uniformed para-state run by the intelligence services. He is also a hostage to the inability or unwillingness of the U.S. government to call things by their right names. President Barack Obama and Secretary of State Hillary Clinton have made the correct noises about the relevant international statutes governing immunity, and their envoy Sen. John Kerry (who should never have been sent unless notified in advance that he would return with the prisoner) has even spoken of putting Davis on trial in the United States, which in ordinary circumstances might seem a little premature. But they all talk as if Pakistan were a country of law, and they all talk as if Pakistan were not a client state. Its client status, indeed, is what leads so many Pakistanis to detest America, without whose largesse and indulgence it would long ago have faced collapse. Thus to the final irony: We are denied leverage by the fact of the very influence for which we are hated.

This sick relationship with Pakistan, which plays a continuous and undisguised double-cross on us in Afghanistan, will probably have to be terminated at some point. But in the meantime, it will have to be made very clear to the rulers of that country that if they want to keep Raymond Davis in prison, they will have to manage without our subsidies. He may be a bad test of an important principle, but it is still the important principle that is being tested, and we have no more right to compromise on the principle of diplomatic immunity than the Pakistanis have to violate it.

Like Slate on Facebook. Follow Slate and the Slate Foreign Desk on Twitter.