WHO, WHAT, WHY?
The Magazine answers...
Claims that counter-terrorism officers secretly recorded discussions between an MP and a constituent he was visiting in jail have caused controversy. But how common is it for prisons to be bugged?
Surveillance cameras are an everyday reality, in and out of prison
A microphone hidden in a table, it's hardly James Bond but it has got the police and the government in hot water.
It's how Scotland Yard's anti-terrorist squad allegedly eavesdropped on conversations between Labour MP Sadiq Khan and his constituent Babar Ahmad. He is in prison awaiting extradition to the US, where he is accused of running websites supporting the Taleban and Chechen terrorists.
Bugging telephones is common, even mandatory in some cases
Bugging face-to-face conversations between prisoners and visitors is less common, but can happen
The row centres around whether the reported bugging broke a code which forbids the covert recording of conversations between MPs and their constituents. But aside from the political row, just how common is it for prisons to be bugged?
Certain methods of covert surveillance are commonplace in prison, even mandatory in the case of high-risk Category A prisoners, according to the Home Office. These include monitoring telephone conversations and post. Other methods that are categorised as intrusive, like using a hidden microphone, are used occasionally.
Such operations remain low because there are more effective ways of obtaining intelligence, said Home Office minister Gerry Sutcliffe in response to a parliamentary question last year.
However, intelligence expert Stephen Dorrill believes the current case is the "tip of an iceberg".
"There should be a paper trail but it is a bureaucratic system where boxes are just ticked to make things legal. Applications are not looked at in depth."
The rules on bugging - in prison and outside - come under the Regulation of Investigatory Powers Act (RIPA). The legislation covers all methods of surveillance and information gathering used to help prevent crime, including terrorism.
The person who authorises such operations mainly depends on who will be doing the surveillance and what method will be used.
Directed surveillance is covert activity that does not involve any interference with property, for example taking photographs of someone in a public place or using a listening device outside a property to pick up what is being said inside. It requires only internal authorisation by a designated person, like a senior police officer or customs official.
Intrusive surveillance is when bugs are put in residential premises. This includes prisons, or vehicles. The rules are much tighter, for example the investigation must be in the interests of national security. To carry out such operations the security services have to get authorisation from the home secretary.
There are levels of surveillance
Police and customs have to get permission from the Office of Surveillance Commissioners (OSC). It is a tribunal of 26 people appointed by the prime minister. They authorise such requests and also have the power to quash any investigations if the statutory requirements have not been met. In the Kahn case it is alleged that a chief police officer authorised the eavesdropping operations.
It is hard to pinpoint just how much intrusive bugging is done in prisons, say civil liberty campaigners.
"Things like monitoring telephone conversations in prison is a common process," says Simon Davies, director of human rights group Privacy International. "But intrusive surveillance is secretive by its very nature so it's hard to know how often it is done."
Some conversations in prison cannot be bugged in any circumstances because they are privileged, which means they have special immunity from the usual rules or laws. These include conversations between prisoners and their lawyers, their MPs or the Samaritans.
The row over the alleged bugging of Mr Khan's conversation is because he was Mr Ahmad's MP, as well as a childhood friend.
A code known as the Wilson Doctrine forbids the covert recording of conversations between MPs and their constituents. It was adopted following a string of phone-tapping controversies under former Labour prime minister Harold Wilson.
WHO, WHAT, WHY?
A regular part of the BBC News Magazine, Who, What, Why? aims to answer some of the questions behind the headlines
The revelations have also highlighted fears among some defence solicitors that conversations with clients, which are privileged, may also have been recorded.
Simon Creighton represents Harry Roberts who was jailed for killing three police officers in 1966. Mr Creighton says transcripts of two telephone conversations he had with his client were sent to him inadvertently by a government lawyer. He says the recording of an MP's conversations with a prisoner will worry his colleagues.
Human rights lawyer Imran Khan, who represents several terror suspects, says he also suspects some of his conversations with clients in prison may have been taped.
"Certainly things that have happened in the course of my career recently indicate that that might be the case," he says.
"If it's routine and it's simply about intelligence-gathering then it really undermines the principle of confidentiality in the justice system in this country."