The Attorney General, Sir Nicholas Lyell, had asked judges in the Court of Appeal to rule in a test case that the man had committed either murder or manslaughter. However, Lord Taylor immediately allowed yesterday's ruling to go to the House of Lords because of its importance to the law.
He emphasised that his decision would not have any implications for doctors carrying out abortions.
Simon Hawksworth QC had argued at the hearing that no offence could be committed against a child who, at the time of the attack which later caused its death, was as yet unborn and therefore not legally recognised as "a person in being".
He warned the appeal judges that to uphold the Attorney General's case would "open up a very difficult area" in relation to late abortions and the delivery of live foetuses which are then allowed to die.
But Lord Taylor, sitting in the Court of Appeal with Mr Justice Kay and Mrs Justice Steel, said in his judgment: "A doctor who carries out an abortion in accordance with the Abortion Act 1967 is not acting unlawfully and hence, were such a doctor to be charged with murder, the charge would fail because the element that the act must be unlawful could not be made out."
The woman victim was stabbed during a drunken row and gave birth three months prematurely. Her baby, which bore a stab wound in her abdomen, died four months later.
Two years ago, her boyfriend was acquitted of murdering the child on the directions of a judge at Leeds Crown Court.
The man, sentenced to four years in jail for wounding the woman, has not been named at the Court of Appeal and yesterday's ruling cannot affect his acquittal on the murder charge.
However, a new point of law has been formulated which will mean that anyone causing unlawful injury to a foetus or a pregnant woman which eventually causes the death of the child may face manslaughter or murder charges.
In their conclusions yesterday, the judges ruled: "Murder or manslaughter can be committed where unlawful injury is deliberately inflicted either to a child in utero or to a mother carrying a child in utero.
"The requisite intent to be proved in the case of murder is an intention to kill or cause really serious bodily injury to the mother, the foetus before birth being viewed as an integral part of the mother."
Lord Taylor allowed the case to be referred to the House of Lords after Andrew Lees, junior counsel for the man in the Leeds trial, said the judgment was "a matter of great public importance with far reaching consequences.
"It does widen protection to the unborn child, not only to charges of murder and manslaughter but to charges of unlawful violence. It should be decided by the House of Lords because it is a redirection of law."