The Guardian has been expelled from Tripoli for the second time in three weeks as the Libyan regime seeks tighter control over how the conflict is reported to the world.

On Wednesday, I was ordered to pack my bags and leave the country because officials objected to an article in which I interviewed critics of Muammar Gaddafi.

The government demanded that the Guardian publish an apology "to the Libyan people", which it had itself prepared. The paper refused.

Guardian journalist Xan Rice's spell in Tripoli ended similarly abruptly last month. Reporters from the Daily Telegraph, CNN and Reuters have also been expelled in recent days.

Foreign journalists in government-controlled Libya are obliged to stay at one hotel, the Rixos in Tripoli, and are not allowed to leave the grounds without a government "minder", causing frustration and strained relations. Their output is closely monitored by Libyan officials.

On Tuesday I walked out of the front gate unaccompanied, caught a taxi to a neighbourhood known for anti-Gaddafi dissent, interviewed some of its residents and reported my findings.

Within hours of the article appearing online, I was summoned to the media centre where an official held up a print-out of my article, the offending passages highlighted in yellow, and ripped it in half. He said: "Tomorrow you must leave Libya for ever! You can never come back, even when there is peace."

It was explained that there was no record of me having left the hotel on Tuesday morning, therefore I must have sat in my room and made up all the quotations. But I was given one last chance: I could remain in Tripoli if I handed over my interviewees or if the Guardian published a retraction that denied their existence. This is the absurd apology they demanded:

"Declaration of apology

To the Libyan people:

Regarding our article on the 6/7/2011 describing the situation in the Soug-Al-Jouma area of Tripoli, narrating stories of some residents opposing the Libyan system, and using obscene words against the person of (Muammar Gaddafi) who is the leader and symbol for all Libyans.

And where this report is contrary to truth and that these cases referred to do not exist.

Therefore please accept our apology,

The Guardian."

I took the car out of Libya instead. I was joined by a Daily Telegraph journalist who had committed the same offence. This means that, at least for now, no British or American newspaper reporters remain in Tripoli, although the BBC, ITV, Sky and other international media are still present.