Mr Ahmad, a constituent and childhood friend of Mr Khan's, faces extradition to the US over claims he was involved in running a website raising funds for terrorist groups.

It emerged in reports in the Sunday Times over the weekend that Mr Khan's visits to Mr Ahmad had been bugged.

This prompted concerns the Wilson doctrine, which prohibits the covert surveillance of MPs and peers, had been breached.

Last night, Mr Kearney, who faces unrelated charges for leaking stories to a local newspaper, revealed he had recorded the conversations.

He said he had done so under "significant pressure from the Met police requesting that we covertly record a social visit between a terrorist detainee and a member of parliament."

In a statement released through his solicitors he continued: "The MP concerned was Sadiq Khan.I did record the visit but have never felt it was justified in these circumstances."

Shadow home secretary David Davis told the BBC: "If true this is an extraordinary allegation. It suggests that the decision to bug Sadiq Khan was much wider than just some junior or middle ranking officers in one police force."

Mr Straw insisted yesterday that ministers had not been involved in authorising the surveillance.

Human rights group Liberty have called for reform of the surveillance laws, arguing warrants should be issued by judges rather than police officers or ministers.