The former director of public prosecutions Lord Macdonald has warned unacceptable practices by undercover officers might still be in use, following claims the Met police used the identities of dead children in covert operations.
Public confidence in a vital part of the fight against organised crime was at risk as the police appeared to have "completely lost their moral compass", he told the BBC Radio 4 Today programme.
He also said it was "really worrying" that police chiefs appeared not to have entirely ruled out a repeat of recently-exposed cases of officers entering sexual relationships with targets.
"How are you supposed to maintain a level of fair and objective evidence-gathering if you are having sex with the person you are targeting, fathering a baby and then abandoning it, using a dead child's identity?" he asked.
"These are all examples of areas in which the police have completely lost their moral compass and have completely failed to understand the boundaries.
"We don't know quite how these units were operating in days gone by. It looks as though they've effectively gone rogue. I am not at all clear how high up in Scotland Yard these sorts of operations were being organised."
He added: "What we really need is a public inquiry into undercover policing which takes evidence, takes advice, sets out some guidelines, sets out some mechanisms so we can be confident these sorts of procedures are not being followed today.
"We need to know how we got there, where we are now and we need to be reassured that this sort of behaviour won't occur in the future and I think an inquiry is really the only way to achieve that.
"I do think the government will think seriously about this because these sorts of stories seem to be endless.
"It is is corrosive, it is seedy and I think we really need to find ourselves in a position where we can reassure the public that this sort of behaviour is not going to carry on."
After initial protestations that undercover officers getting sexually involved with targets could no longer happen, there appeared to have been a "subtle shift in which it is being suggested that it could be appropriate in some circumstances".
"This is a deeply ethical issue which the police have to grapple with," he said.
The Guardian reported that Metropolitan police authorised the practice for covert officers infiltrating protest groups without consulting or informing the children's parents.
Over three decades generations of officers went through national birth and death records in search of suitable matches, the newspaper said.
The creation of aliases resulted in officers being issued with official documents such as driving licences and national insurance numbers.
Scotland Yard said the practice was not "currently" authorised and announced an investigation into "past arrangements for undercover identities used by SDS (Special Demonstration Squad) officers".
The practice was allegedly adopted to lend credibility to officers working undercover and provide them with a back story while spying.
One officer, who adopted the fake persona of Pete Black while undercover in anti-racist groups, told the Guardian he felt he was "stomping on the grave" of the four-year-old boy whose identity he used.
"A part of me was thinking about how I would feel if someone was taking the names and details of my dead son for something like this," he said.
Another officer, who used the identity of a child car crash victim, said he was conscious the parents would "still be grief-stricken" but argued his actions could be justified because they were for the "greater good".
Both officers worked for the Special Demonstration Squad (SDS), which was apparently disbanded in 2008.