It would be impossible to prove that two doctors authorised abortions solely on the basis of the baby's gender, the director of public prosecutions has said in an explanation of why charges were not brought against them.

The allegations against the two medics, known only as Dr S and Dr R, surfaced following an undercover newspaper investigation in which a pregnant woman said she did not want to give birth to a girl. The Daily Telegraph claimed that illegal sex-selective terminations were being carried out in the UK.

On Monday tThe DPP, Keir Starmer QC, set out in detail the reasons why he did not believe prosecution would be in the public interest.

"The law does not, in terms, expressly prohibit gender-specific abortions; rather it prohibits any abortion carried out without two medical practitioners having formed a view, in good faith, that the health risks of continuing with a pregnancy outweigh those of termination," he said.

"On the facts of these cases, it would not be possible to prove that either doctor authorised an abortion on gender-specific grounds alone. Dr S said she did not believe that the 'patient' actually knew the gender of her baby.

"In both cases the 'patient' gave mixed reasons for wanting a termination, making reference to a previous female pregnancy which had gone wrong because of an alleged chromosomal abnormality, thus making it impossible to prove that either doctors authorised a termination solely on the grounds of the sex of the baby."

Starmer said the only basis for bringing a prosecution would be that the doctors "did not carry out a sufficiently robust assessment of the risks" to the patient's health of continuing with the pregnancy.

But he added: "The public interest in this case is finely balanced. But, if the narrow basis of any prosecution is kept firmly in mind, the public interest factors against prosecution outweigh those in favour."

His explanatory letter, addressed to the attorney general, Dominic Grieve QC, also notes that the General Medical Council is still investigating the two doctors.

Starmer raised questions about the practice of doctors signing abortion forms assessing a patient even though they may never have seen or examined them.

He said: "I appreciate that others may disagree with the decision arrived at in this case, but I am content that the decision not to prosecute on the facts in these cases was the right decision."

After discussions with the DPP, Grieve said he was satisfied that Starmer had taken the decision "properly and conscientiously".

Grieve said: "I understand that the question in these cases was not whether this was a gender-specific abortion, but whether the doctors made a proper, considered medical judgment.

"This was a difficult decision, and different prosecutors may have come to a different conclusion, but it is not for me to say whether it is the right or wrong decision. It is for the DPP to make his decisions independently and based on the individual facts of the matter. However, following our discussions, I am satisfied that the director has taken this decision properly and conscientiously."