One October day in 1976, a Cuban airliner exploded over the Caribbean and crashed, killing all 73 people aboard. There should have been 74. I had a ticket on that flight, but changed my reservation at the last moment and flew to Havana on an earlier plane.

I was sitting by the pool of the Hotel Riviera when I heard news of the crash. A few days later, I attended a powerfully moving ceremony at which one million Cubans turned out to hear Fidel Castro denounce the bomb attack. On the reviewing stand next to him were flag-draped coffins of the few victims whose remains had been found.

Investigators in Venezuela, where the doomed flight originated, quickly determined that a famous anti-Castro terrorist, Luis Posada Carriles, had probably planned this attack. More than 30 years later, however, Posada remains amazingly immune to prosecution. Instead of going to jail, he went to work for the CIA.

Last week a federal judge in Texas threw out a case against Posada. The Bush administration has power under the Patriot Act to detain him indefinitely, and could even extradite him to Venezuela. Instead it has chosen to protect him.

Few themes have recurred more often in President Bush's speeches than the denunciation of countries that protect terrorists. The Posada case, however, greatly weakens his moral authority to accuse those countries.

Posada's career follows the arc of anti-Castro activism over half a century. He was born in Cuba, fled to Florida after Castro took power, and in 1961 participated in the CIA's ill-fated Bay of Pigs invasion. After its failure he went back to work for the CIA. He joined its clandestine anti-Castro project, based in the Florida Keys.

Later Posada moved to Venezuela where, without cutting his ties to the CIA, he became a senior officer in the security police. After the 1976 plane bombing, he was arrested, tried, found guilty, sentenced and imprisoned. He spent several years in a comfortable jail cell and then, one day in August of 1985, he disappeared.

That was the last I heard of him until the next year. I was in Nicaragua covering the trial of a CIA contractor whose plane was shot down while dropping supplies to anti-Sandinista contra rebels. The contractor was shown surveillance photos taken at Ilopango Airport in El Salvador, where contra supply planes were based, and he identified one of the men he worked with there as Ramon Medina. He was actually Luis Posada Carriles.

It turned out that after his mysterious escape from jail, Posada had left Venezuela using a false Salvadoran passport, changed his name and reportedly even altered his appearance through plastic surgery. He told a journalist who found him in El Salvador that he was engaged in "a fight against international Communism, against Castro in all parts of the world". Apparently the CIA had welcomed him back into its ranks.

Over the years since then, Posada has had several brushes with the law. He was jailed in Panama on charges of plotting to assassinate Castro at a summit of Latin American leaders, but was freed by presidential pardon. Wherever he lands, he shows a remarkable ability to escape serious punishment.

Venezuela, with which the United States has an extradition treaty, has been seeking his return for years. American officials have steadfastly refused to extradite him.

In 2005 Posada surfaced in Miami. Prosecutors filed an immigration fraud case against him, but according to the verdict in last week's case, they used impermissible tactics in interrogating him. He left the court a free man.

The United States is holding hundreds of suspected terrorists in prisons at Guantanamo and elsewhere. Many are locked up indefinitely. They have not been tried or even charged with any crime. Posada, meanwhile, is "jumping for joy" at the way the United States has treated him, according to one of his lawyers.

After last week's verdict, a spokesman for the US Department of Justice said Posada's case is under review. A grand jury in New Jersey is investigating his role in the bombing of Cuban hotels in the 1990s. So far, though, the services he provided to the CIA for more than four decades have protected him.

"If you harbour a terrorist, you are a terrorist," President Bush famously declared after the attacks of September 11, 2001. The United States is now harbouring Luis Posada Carriles. His continued freedom mocks victims of terrorism everywhere. It also shows how heavily the "war on terror" is overlaid with politics and hypocrisy.