Image caption Undercover officer Mark Kennedy infiltrated campaign groups - had a string of relationships

A rulebook covering the conduct of undercover police officers in England and Wales and how they are supervised has been published for the first time.

The draft guidance bans sexual relationships and says officers must submit to regular psychological tests.

The College of Policing said it had taken the unprecedented step in an effort to win back public support after a string of controversies.

The move comes ahead of a major public inquiry into undercover malpractice.

It will investigate how officers had sexual relationships with women, deployments leading to miscarriages of justice and whether two secretive disbanded units were out of control.

Undercover under attack: The key allegations

More than a dozen relationships exposed - huge sums paid out to the victims

Officers in two units used the names of dead children to create cover stories

Fifty convictions quashed - possibly 83 more miscarriages being investigated

Family justice campaigns, leftwing MPs and trade unionists monitored for no clear reason

Claims that intelligence was gathered on Stephen Lawrence's family

Officers suffering Post-Traumatic Stress Disorder

Undercover policing inquiry: Why it matters

The new rules - which are subject to a public consultation until 10 August - have been brought together for the first time to explain the legal, ethical and safety issues around operations.

This conduct will never be authorised, nor must it ever be used as a tactic of a deployment Alex Marshall, on officers having sexual relations

The College of Policing, a national standards-setting body, says it is now assessing undercover units and has the power to withdraw their approval to operate.

The 80 pages of guidance state:

Undercover officers cannot be deployed until they have passed nationally-recognised training and psychological screening - something that has never happened before

Taking drugs is banned as a tactic to infiltrate crime gangs because of a force's duty to protect officers' health

Chiefs will be responsible for approving operations, including how they change over time, rather than leaving an undercover officer to work things out for themselves.

The college's head, Chief Constable Alex Marshall, said undercover policing was "essential" for catching some criminals - and the police had to be as transparent as possible about how this risky work was carried out in the public interest.

He said: "By publishing the vast majority of the guidance, withholding only operational tactics which would no longer be viable if shared, we want the public to see the measures we have in place to ensure undercover policing is used in a way that is proportionate, lawful and ethical."

Image copyright Science Photo Library Image caption Drugs: Officers can't take drugs as part of their deployment deep into criminal networks

Sexual relations

The new rule book states: "It is never acceptable for an Undercover Officer to form an intimate sexual relationship with those they are employed to infiltrate and target or may encounter during their deployment.

"This conduct will never be authorised, nor must it ever be used as a tactic of a deployment."

"It can't be authorised. It's wrong, it shouldn't happen," said Chief Constable Marshall. "If in some extreme circumstance something happens where the operative has gone outside this guidance, then you have to report it and it will be investigated."

Mental health

The public inquiry will examine whether officers are properly looked after by their forces - and under the new rules, they must be psychologically assessed at least every six months.

Peter Francis, a former undercover officer who suffered long-term damage to his mental health while deployed with a disbanded Scotland Yard unit, warned that more still had to be done to protect those in the field today.

"These new guidelines on psychological support aren't necessarily new. Promises were made in the past within my unit, the Special Demonstration Squad, but officers still suffered numerous psychological problems," he said.

And solicitor Jules Carey, who is involved in ongoing legal action over alleged undercover abuses, cautiously welcomed the guidance banning sexual relations.

But he added: "It is disappointing that the guidance fails to spell out that in a democracy the first consideration should whether it is necessary to use an undercover officer at all, or whether the intelligence could be obtained through some other means.

"The guidance should also make it clear that the degree of intrusion should be proportionate to the seriousness of the crime being investigated."