A coalition rift over the treatment of David Miranda has been exposed after Nick Clegg raised questions about whether police acted lawfully in "forcibly detaining" the partner of a Guardian journalist.

In a direct challenge to Theresa May, the home secretary, who has endorsed the action by the Metropolitan police, the deputy prime minister said police needed to act proportionately as he indicated that the Liberal Democrats would press for restrictions to anti-terror laws.

In his first detailed response since the nine-hour detention of Miranda at Heathrow on Sunday, Clegg, writing in the Guardian, confirmed that he was not consulted in advance about the police action and said he will wait to see whether the anti-terror legislation watchdog rules on whether the police action was "legitimate".

The remarks will raise new questions about whether the Met acted lawfully in detaining the partner of Guardian journalist Glenn Greenwald under schedule 7 of the Terrorism Act 2000. This says that police can only detain an individual at ports and airports to assess whether they have "been concerned in the commission, preparation or instigation of acts of terrorism".

Clegg contrasted the police action with the way in which the government negotiated with the Guardian to destroy hard drives containing NSA documents leaked by the whistleblower Edward Snowden.

Clegg wrote: "I was not consulted on the plans to detain David Miranda before it happened and I acknowledge the many concerns raised about the use of Schedule 7 of the Terrorism Act 2000 for these purposes.

"There is obviously a material difference between agreeing by mutual consent that files will be destroyed, and forcibly detaining someone.

"Terrorism powers should be used proportionately. That is why it is immensely important that the independent reviewer of terrorism powers, David Anderson QC, reports rapidly on whether this was a legitimate use of the Terrorism Act, and whether that legislation should be adjusted."

Anderson, who is to question Home Office officials who briefed May on the plan to detain Miranda during his short inquiry, called this week for changes to the Terrorism Act. May has ruled out any further changes beyond those proposed before the detention of Miranda.

Clegg wrote: "This autumn we will be taking a bill through parliament to implement these changes [announced before the detention of Miranda]. In my view, if David Anderson provides a clearly justified recommendation to restrict these powers even further, we should seek to do so in this bill."

In his article Clegg confirmed that in its negotiations with the government the Guardian made its own decisions about whether to publish information from the leaked NSA documents which could damage national security. "Along with the information the newspaper had published, they had information which put national security and lives at risk. It was right for us to want that information destroyed. They had decided not to publish this information: not a single sentence was censored from their newspaper as a result of the information being destroyed."

Clegg used his article to dismiss a claim by William Hague, in the wake of the first revelations in June from the leaked NSA documents, that law-abiding citizens have "nothing to fear" about monitoring by intelligence agencies. The deputy prime minister wrote: "Liberal Democrats believe government must tread the fine line between liberty and security very carefully, and are not easily persuaded by a government minister asserting: 'Just trust me.'"

He was also scathing about Yvette Cooper, the shadow home secretary, who had raised questions about the detention of Miranda.

He wrote: "People are right to ask questions about the detention of David Miranda for nine hours this week. But Yvette Cooper voted for powers to detain suspects for 90 days – 2,160 hours. Her outrage is almost comic."