PHILADELPHIA — A Philadelphia abortion doctor convicted of killing three babies who were born alive in his grimy clinic agreed Tuesday to give up his right to an appeal and faces life in prison but will be spared a death sentence.

Dr. Kermit Gosnell, 72, was found guilty Monday of first-degree murder in the deaths of the babies who were delivered alive and killed with scissors.

In a case that became a flashpoint in the nation's abortion debate, former clinic employees testified that Gosnell routinely performed illegal abortions past Pennsylvania's 24-week limit, that he delivered babies who were still moving, whimpering or breathing, and that he and his assistants dispatched the newborns by "snipping" their spines, as he referred to it.

Prosecutors agreed to two life sentences without parole, and Gosnell was to be sentenced Wednesday in the death of the third baby, an involuntary manslaughter conviction in the death of a patient and hundreds of lesser counts.

Prosecutors had sought the death penalty because Gosnell killed more than one person, and his victims were especially vulnerable given their age. But Gosnell's own advanced age had made it unlikely he would ever be executed before his appeals ran out.

Gosnell has said he considered himself a pioneering inner-city doctor who helped desperate women get late-term abortions. Defense lawyer Jack McMahon said before the sentencing deal that his client's bid for acquittal was a battle.

"The media has been overwhelmingly against him," McMahon said. "But I think the jury listened to the evidence ... and they found what they found."

The gruesome details of Gosnell's operation came out more than two years ago during a grand jury investigation of prescription drug trafficking. Authorities raiding Gosnell's clinic for drugs instead found bags and bottles of fetuses, including jars of severed feet, along with bloodstained furniture, dirty medical instruments and cats roaming the premises.

Prosecution experts said one of the babies was nearly 30 weeks along when the abortion took place, and was so big that Gosnell allegedly joked the baby could "walk to the bus." A second baby was said to be alive for about 20 minutes before a clinic worker snipped the neck. A third was born in a toilet and was moving before another clinic employee severed the spinal cord, according to testimony.

A fourth baby let out a whimper before Gosnell cut the neck, prosecutors alleged. Gosnell was acquitted in that baby's death, the only one of the four in which no one testified to seeing the baby killed.