I had visited several times and there was something nagging at me. I could not work out what left me uniquely unsettled about the place. It was not the depressing environment; few prisons are inspirational. It was not the occasional intimidation. Eventually it came to me: I could not remember being lied to so often and so consistently. In Guantánamo, lying was a disease that had reached pandemic proportions.

Former "detainee" Binyam Mohamed [British resident arrested in Pakistan] viewed the whole military commission process as a con, a lie that was meant to deceive the world. In June 2006 the supreme court said the same, in more temperate terms, and struck down the commissions as illegal. It rejected Donald Rumsfeld's assurance that the trials would be fair, accusing the administration of "jettisoning" legal rights.

In Guantánamo, the military began with smaller lies and worked upwards. I was visiting Camp Echo one day and they had messed up the visitation schedule. The client I was meant to see was not there, although I had sent the schedule for my visits several weeks before. I thought I might as well go ahead and see Shaker Aamer [British resident captured in Afghanistan], whom I was not meant to meet until later in the week. So I asked the SOG (the sergeant of the guard, in charge of the camp) whether Shaker was in his normal cell. "No, he's not here," the SOG replied. I settled down for another wasted hour, waiting for the military to bring over someone I could see. It was hot even under the umbrella at the "picnic table" - the area behind one of the cells in Camp Echo where they made lawyers wait. I watched a lizard crawling up the green mesh on the wire fence. I thought about the spider in Robert the Bruce's cave, continually battling to spin its web and teaching patience to the early Scottish nationalists.

The next day I saw Shaker. "Were you here yesterday?" I asked. "Yeah, of course. I've been here for weeks," he replied. So why did the SOG lie to me? He could have said, "Sorry, sir. I am not permitted to speak about that," or "Yes, sir, he is here, but I am afraid we cannot deviate from the schedule." Instead he looked me in the eye and lied. It was unsettling. He had seemed a clean-cut, well-mannered sort of person.

The dissembling disease got worse as time passed. First there was the effort to suppress the truth, with censorship or silence rather than any overt falsehood. Then there was the lie by semantics, where the US military redefined the language to provide plausible deniability. Finally, there was the bare-faced lie. This kind of culture does not germinate in a vacuum. Rumsfeld is responsible for a reconstitution of the English language. I set about compiling a glossary of the Gitmo-speak. The language was so deceptive that I found it appalling and amusing in equal measure.

In a December 2004 press conference, the US navy secretary Gordon England tried to defend conditions in Guantánamo by producing the novel argument that the camp was rehabilitative: "People have learned to read and have learned to write, and so it's not just being incarcerated. We do try to get people prepared for a better life." Prisoners had some difficulty exercising their new-found abilities. Indeed, contrary to England's statement, prisoners in Guantánamo were certainly not considered "people" and the guards were not even allowed to call them "prisoners". One of the escorts told me that, on pain of punishment, soldiers are required to call them "detainees". He wouldn't even say the word "prisoner" out loud. The Pentagon had come to the conclusion that it sounds better for us to "detain" someone for several years, given that he has not been offered a trial. Naturally I set about avoiding the word "detainee".

Meanwhile the authorities exercised rigid control over any information that the prisoners received. Each time I went to visit, I would take a suitcase full of reading materials. I maintained a log reflecting the fate of each publication. Magazines awarded the stamp DENIED included National Geographic, Scientific American and Runner's World. On one occasion it seemed justified, since that month's National Geographic had a story about building an atomic bomb, but the editions about whales and African tribes hardly seemed a threat to national security. One soldier explained the censorship of Scientific American to me: the prisoner might learn about some hi-tech weapons system. Banning Runner's World was less obvious, given the naval base was surrounded on one side by a Cuban minefield and on the other three by ocean.

I was surprised - and Shaker Aamer was incensed - that they would not let in The African-American Slave by Frederick Douglass. Uncle Tom's Cabin was also barred. I dropped off an anthology of first world war poetry for Omar Deghayes that included Wilfred Owen's poem Futility, about the ghastly violence of war. It was returned DENIED.

Omar was born in 1969 and was a British refugee from Libya. His father was tortured and killed by Muammar Gadafy in 1980, and as a teenager Omar moved with his family to Brighton and studied law. He had not completed his law exams, so I brought his books so he could study, ready for his release. Law books, though, were not permitted, least of all a subversive tome about the legal rights of prisoners.

The Save Omar campaign auctioned off an autographed copy of John Pilger's book Hidden Agendas to raise funds. The highest bidder donated it back, so I could try to get it in to Omar. It was written in 1998 and the index had no references to Islamic extremism. The most controversial statement I could see in the book was Pilger's comment that most of the victims of terrorism were Muslims. It never got through.

At this point British political authors began to vie for the status of having a book banned. The New Statesman editor John Kampfner gave me a signed copy of his book Blair's Wars for Omar. Clare Short signed a copy of An Honourable Deception? New Labour, Iraq and the Misuse of Power with a dedication: "Hope you will be back with us soon, Omar.". An inverted snobbery began to develop: if your book slipped through the censors, perhaps that would cast doubt on the credibility of your opinions. I worried that Jeremy Paxman would be disappointed that his book The English was allowed in.

The only Australian left in Guantánamo, David Hicks, was facing a military con-mission, like Binyam, and his lawyer was banned from giving him Scott Turow's legal thriller Presumed Innocent. The basis for censoring The New Dinkum Aussie Dictionary was less clear. Perhaps the strangest decision involved four books returned with the notation: "These Items were not Cleared for Delivery to the Detainee(s)." They were Puss in Boots, Cinderella, Jack and the Beanstalk, and Beauty and the Beast - all in Arabic translation. As one FBI agent admonished me: "You know that Arabic script is full of squiggles, and it can easily hide messages to the prisoners." Could it be, I wondered, that Cinderella was secretly an enemy combatant? Eventually the military barred us from bringing books for our clients altogether. So much for education.

Next there was the senseless secrecy. Every word that my Guantánamo clients said to me was deemed classified and I had to get permission from censors to reveal it. To violate them would be a criminal offence and I could end up in jail. Whenever I met with a client I would take notes, but I could not take them with me when I left. I was obliged to put them into an envelope, seal them with SECRET stickers and give them to the military escort to mail to Washington. The notes went by normal mail, which seemed far from secure. Indeed, the first time I visited the military lost my notes for weeks.

This procedure prevented the lawyers from revealing the truth about Guantánamo for a long time after any visit. This meant that I would visit Guantánamo, fly back to England, then return to Washington three weeks later to review my own notes. Meanwhile I was forbidden from saying anything to anyone about what my clients had said. Once the notes arrived in Washington, I would get notice that I could come to the "secure facility" to review them and submit facts for classification review. Even today I cannot repeat some of what my clients told me, but nothing I learned in Guantánamo would be classified in a sane world. I never saw anything that was relevant to US national security, unless it would make the US less secure to admit the truth about torture committed by American personnel.

All this was to control the flow of bad news out of Guantánamo. From the beginning Joe Margulies, the other civilian lawyer working for Binyam Mohamed, encapsulated the proper response to this: if we could open up the prison to public inspection, the government would close it down. The awkward truth about what was happening there would outweigh any perceived benefit of keeping the prison open. Meanwhile, the government wrote the rules. The military censor was dogged in defence. It was not his fault; he was merely applying the rules and trying to do it as politely as possible when we met in the secret Washington facility.

In November 2004, I met Moazzam Begg in Camp Echo. Moazzam was from Birmingham, and we talked for hours and he poured out his desperate experiences. He impressed me from the beginning with his understated eloquence. He had been with his family in Afghanistan, working on a charitable project that involved schools and water wells. When he and his family fled the war to Pakistan, he became one of hundreds sold for bounties to the Americans. Later, he ended up in Guantánamo, tarred as a major terrorist.

When my notes got back to Washington, in January 2005, I wrote a 40-page memo about how Moazzam had been abused by the US military in Afghanistan. Every word was censored. The way the military had pretended to torture his wife in the next room, even information about American soldiers murdering two prisoners in front of Moazzam, was considered a "method of interrogation" that could not be revealed. I was not allowed to reveal how my clients' mental health was crumbling either. Moazzam had been tortured, then held in solitary confinement for 18 months; he suffered from post-traumatic stress disorder; he had nightmares, flashbacks, all the symptoms. But this, the military said, was a privacy issue.

The effort to suppress this backfired. Had they come out immediately, the facts of Moazzam's abuse would have soon have slipped into obscurity. The cover-up ran and ran. I wrote one letter to Tony Blair which began with a title, Re: Torture and Abuse of British Citizens in Guantánamo Bay. The next two pages were the highlights of the torture committed against Moazzam and other British citizens. I put in a paragraph saying, "Anything that has been censored or blacked out in this letter, your close allies in the United States don't think you should be allowed to hear." I then attached the 40-page memo detailing Moazzam's abuse. What I got back from the censor was extraordinary. Every word about torture was declared to be classified, except the title, but the last sentence made it past the hovering black marker.

By now there were perhaps a dozen on our team of volunteer lawyers and each one was running into similar problems with the censorship regulations. We tried to press the issues systematically, and eventually the government was persuaded to relax the rules. At last we could get information out to prove how the clients had been mistreated, and the memos about Moazzam's mistreatment were cleared. Indeed, with the threat of this evidence of torture making it into the public eye, the pressure on the Bush administration increased, and at the end of January, Moazzam and the three British prisoners who remained in the prison (Feroz Abbasi, Richard Belmar and Martin Mubanga) were set free.

Moazzam and Feroz had been among the six prisoners originally charged in the military commissions, supposedly the very worst terrorists on the base. Their release, and the fact that the British government found no charges to bring against them, illustrated the extent of the US military's delusion.

Gaining trust

Gaining trust is not easy. When we won the right to visit the prisoners the military tried to outflank us. They began by sending in interrogators pretending to be lawyers. They said all the lawyers were Jewish, relying on perceived Muslim prejudices to drive a wedge.

The next gambit was arguably even sillier. "They have been saying ..." Usama Abu Kabir hesitates, not wanting to go on. "They say ... " By this time Usama is scarlet. He is a courteous man. "Well ... that you like having sex with men!" I want to say that it should make no difference to him. I can't afford to, as so many of my clients here have been brought up in conservative Islamic countries, and we don't have time for a debate. I have to wave my wedding ring about and issue a denial.

There are valid reasons for mistrust. What is to distinguish the lawyer from an interrogator after years of deception? To represent a prisoner here you must be an American citizen. "Hi! I'm from America and I'm here to help you." When a prisoner has a legal visit it is called a "reservation", the euphemism used for interrogation.

Some lawyers say the meetings are confidential. The prisoners laugh. Everyone knows that there are cameras in the cell and microphones by the door.

There are other problems. One saw a client for the first time with a translator whom the prisoner had previously seen working with US military intelligence.

· Extracted from Bad Men by Clive Stafford Smith, published by Weidenfeld and Nicolson on April 26th priced £16.99.

· In tomorrow's Observer: read about the journalist interned at Guantánamo in another extract from Bad Men