Undercover police officers who allegedly had relationships with women activists in groups they infiltrated have for the first time been named by the Metropolitan Police.

Last month High Court judge Mr Justice Bean ruled the Met could not use its policy of ''neither confirm nor deny'' (NCND) in response to damages claims brought by women who said they were tricked into forming relationships with undercover officers.

The force's long-standing NCND policy was designed to protect the identities and safety of officers working undercover.

But after the judge issued the force an ultimatum, the identities of the officers have been disclosed in court papers filed as part of the force's defence to the civil claims, the Met confirmed today.

A spokesman for the Met said: "In compliance with the order of Mr Justice Bean the MPS has confirmed in its defence that Jim Boyling and Bob Lambert were undercover police officers."

The women are among a number of people who want compensation for emotional trauma allegedly caused by officers infiltrating environmental activist groups.

Their claims for deceit, assault, negligence and misfeasance in public office arise out of long-term and intimate sexual relationships they had with four men who - unknown to them - were members of the Special Demonstration Squad (SDS), between 1987 and 2007.

Mr Justice Bean issued an ultimatum which forced the Met to disclose the names in its defence in order to be able to answer to the claims and had the force not done so within 28 days it would have been taken to admit them.

At the time, lawyers for the women described the ruling as a ''devastating blow'' for the Met.

Solicitor Harriet Wistrich of Birnberg Peirce and Partners said: ''The police have been on notice of this case for three and a half years and until this judgment, they have wilfully refused to engage in any meaningful way with the most serious allegations put to them.

''Their ongoing refusal in the face of an overwhelming body of evidence in the public domain has greatly aggravated the distress caused to my clients, who want answers from the police as well as justice and accountability."