Why did I offer to provide surety for an alleged rapist, a man I have never met? That's the question even my mother asked me after I appeared in court for Julian Assange.

That morning I had sent a spur-of-the-moment message of support by email to Assange's lawyer, Mark Stephens, when I read of his arrest. He immediately responded and asked if I would be prepared to come to court in the next hour to act as a surety for Assange. I was nervous about the inevitable media circus, but felt that it was the right thing to do after being convinced by Stephens that it could help.

Assange has not even been charged, let alone convicted. Swedish prosecutors do not have to produce any evidence that he committed the alleged sexual offences to justify the warrant. On the basis of the allegations that I heard read out in court, the evidence seems feeble, but I concede that I don't know the full facts. Neither does Assange. Stockholm's chief prosecutor, Eva Finne, who heard the evidence against Assange in August, threw the case out of court, saying: "I don't think there is reason to suspect that he has committed rape."

That is not the reason I was there. I was there because I believe that this is about censorship and intimidation. The timing of these rehashed allegations is highly suspicious, coinciding with the recent WikiLeaks revelations and reinvigorated by a rightwing Swedish politician. There are credible rumours that this is a holding charge while an indictment is being sought in secret for his arrest and extradition to the US. An accusation of rape is the ultimate gag. Until proved otherwise, Assange has done nothing illegal, yet he is behind bars.

There is a fundamental injustice here. There are calls for the punishment (execution even) of the man who has reported war crimes, but not for those that perpetrated or sanctioned them.

On the one hand, the US is proud of its First Amendment and its long-standing commitment to the freedom of speech. It was announced last week that the US is to host next year's Unesco World Press Freedom Day event, which champions in particular "the free flow of information in this digital age".

On the other hand, it is examining ways to take legal action against Assange, who is in effect editor of the world's first stateless (non-profit) media organisation. It has blocked access to the WikiLeaks website and denied its citizens the ability to register protest through donations, all without a warrant. It has also successfully pressured Amazon, Visa, Mastercard and PayPal to withdraw their services from WikiLeaks, as well as the Swiss bank PostFinance, to close Assange's account.

WikiLeaks offers a new type of investigative journalism. I have my doubts about whether some cables should have been leaked – for example, the list of infrastructure sites vital to national security – and I share the concern that diplomacy could suffer as a result of others. But I feel passionately that democracy needs a strong and free media. It is the only way to ensure governments are honest and remain accountable.

WikiLeaks has revealed that we have been told a great many lies about the wars in Iraq and Afghanistan and that there has been little accountability. How are the recent revelations regarding America's secret war in Yemen not in the public interest? Don't American citizens have the right to know that, contrary to official denials, they have paid for cruise missile attacks on Yemen, which have accidentally killed 200 civilians?

I have a personal interest in the revelations about Pakistan, which highlight what many of us have long feared: that contrary to assurances from Pakistan's leaders, the US is fully ensconced, with bases and special forces, that there have been unreported civilian deaths and that the unwinnable war in Afghanistan is spilling over the border into its weak, corrupt and nuclear neighbour. The best justification governments can find to shut down information is that lives are at risk. In fact, lives have been at risk as a result of the silences and lies revealed in these leaks.

Exposés have always been initiated by leaks. As Assange himself has said: "If journalism is good, it's controversial." Without illicit information President Nixon would not have been forced to resign, we would never have known about the abuse of detainees by US personnel at Abu Ghraib, nor that US intelligence was phone-tapping and looking at emails without warrants. Daniel Ellsberg has said that when he released the Pentagon papers during the Vietnam war he suffered similar attacks. He was put on trial for theft and conspiracy and stolen medical files were used to discredit him. Now he's viewed as a journalistic hero.

If WikiLeaks is a terrorist organisation, as New York congressman Pete King stated, and if its founder, Julian Assange, is prosecuted for espionage, the future of investigative journalism everywhere is in jeopardy, as is our right as citizens to be told the truth.