The former head of MI5 has accused ministers of exploiting fears over terrorism to restrict civil liberties, adding to mounting criticism of the government's record on human rights.

In an interview with a Spanish newspaper, Stella Rimington said state interference in people's privacy played into the hands of terrorists.

"It would be better that the government recognised that there are risks rather than frightening people in order to be able to pass laws which restrict civil liberties, [which is] precisely one of the objects of terrorism: that we live in fear and under a police state," she told La Vanguardia.

Rimington, who stood down as the British security service's director general in 1996, also accused the US of torture.

"The US has gone too far with Guantánamo and the tortures. MI5 does not do that," she said.

Her comments came as a court heard that MI5 lawyers were involved in devising a policy governing the interrogation of terrorism suspects in Pakistan that led to the torture of British citizens and residents. The policy emerged during the cross-examination of an MI5 officer who had questioned Binyam Mohamed, the British resident held in Guantánamo Bay.

In her interview Rimington said: "Since I have retired I feel more at liberty to be against certain decisions of the government, especially the attempt to pass laws which interfere with people's privacy."

Rimington, 73, has been a harsh critic of the government's policies, including attempts to extend pre-charge detention for terror suspects to 42 days and the unpopular ID cards plan.

"I think people are fully aware that the more you intrude into people's civil liberties, the more you set up grievances for people to, you know, encourage people to do all the unpleasant things that are going on," she said.

In response to Rimington's latest warnings, the Home Office said: "The government has been clear that where surveillance or data collection will impact on privacy, they should only be used where it is necessary and proportionate."