The identities of dead teenagers as old as 17 were stolen by undercover police officers according to figures released by Scotland Yard after Chippenham MP Duncan Hames' near two-year battle to expose the information.

The Metropolitan Police revealed that dead children aged "0, 1, 4 to 14, 16 and 17" had their identities stolen by the potentially rogue Special Demonstration Squad (SDS) in a practice the force conceded was "morally repugnant".

The information was obtained by the Liberal Democrat MP after a two-year Freedom of Information (FoI) battle with the Met.

The force only released the figures after a court date was set to hear the Met's appeal against a ruling by the Information Commissioner to publish the figures, and after Mr Hames had tabled a Parliamentary question on the matter.

The practice was widespread according to an investigation of the secretive squad by Derbyshire Chief Constable Mick Creedon, who has also looked at claims that officers were involved in inappropriate sexual relationships while undercover.

Mr Creedon found that out of 106 covert names used by the squad between 1968 and 2008, 42 can be confirmed or be treated as highly likely to have come from dead children.

Mr Hames said families with children who died aged two, three and 15 during the time the practice was going on could now be reassured that their identities had not been stolen.

He said: "The reason I started pursuing this matter was a constituent who had lost his daughter when she was 15.

"When he first heard about this practice he was galled at the thought that someone could be using her stolen identity, leading the life that she should have led, and he is not alone.

"Unfortunately this practice was sufficiently widespread but now a small proportion of families will be able to use this information to be reassured that their child's identity was not stolen, which does raise the question whether there is any other way that the police could help reassure more families.

"But it also proves our case that the Information Commissioner was rightly to make in court that there was a public interest in this information being released."

The data was published nearly two years after Mr Hames originally submitted an FoI request to the Met in Feburary 2013.

The force twice refused Mr Hames' request although it acknowledged the information was available.

After the MP appealed to the Information Commissioner's Office (ICO) in January 2014, it ordered the Met to disclose the information in August, saying this would not lead to the identification of undercover officers.

The force then appealed against the decision to a tribunal, with the ICO and later Mr Hames being confirmed as respondents to the appeal.

On December 17 the hearing date was set for February this year and a day later Mr Hames tabled a parliamentary question to Home Secretary Theresa May on the matter.

Four days after that, the Met wrote to Mr Hames informing him that it would withdraw its appeal and publish the information.

In its final response to the MP, the Met acknowledged that Mr Hames had been on a "difficult journey" in getting the information but said it had reconsidered its challenge to the ICO and acknowledged the fact that stealing dead children's identities may be viewed as "morally repugnant".

Nigel Shankster, the force's senior information manager, wrote: "Before I get to the information itself the Metropolitan Police Service (MPS) believes it pertinent to mention that it has been recognised by the Police Service and the MPS in particular, that the tactic of using the identity of a deceased child to form a legend for undercover police officers may be viewed by some as 'morally repugnant' and that it is no longer police practice.

"The MPS has, in the intervening period, reconsidered its position in challenging the decision of the ICO at Tribunal and has decided that disclosure will indeed be made in this case. Therefore, in accordance with the aforementioned decision notice, please find below the information held by the MPS relevant to your request: The ages of deceased children that were used by undercover officers are 0, 1, and 4 to 14, 16 and 17.

"The MPS fully understands and appreciates that it has been a difficult journey in arriving at this position but does now hope that the information above is of interest."