PHILADELPHIA — A Philadelphia abortion doctor convicted of killing three babies born alive at his grimy clinic was spared a possible death sentence on Tuesday in a deal with prosecutors.


Dr. Kermit Gosnell gave up his right to appeal and in return will spend life in prison. Gosnell, 72, was found guilty Monday of first-degree murder 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 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.


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


Gosnell’s lawyer, Jack McMahon, said his client accepts the verdict and isn’t sorry he went to trial.


He said Gosnell gave up a somewhat better deal early on but wanted to air the issues in court and is satisfied that he did so.


“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.


Gosnell’s attorney argued that none of the fetuses was born alive and that any movements were posthumous twitching or spasms.


Pennsylvania authorities had failed to conduct routine inspections of all its abortion clinics for 15 years by the time Gosnell’s facility was raided. In the scandal’s aftermath, two top state health officials were fired, and Pennsylvania imposed tougher rules for clinics.


Partisans on both sides of the nation’s polarized abortion debate were quick to weigh in after the verdict. Abortion foes said the case helped to illustrate the disturbing reality of abortion.


“This has helped more people realize what abortion is really about,” said David O’Steen, executive director of the National Right to Life Committee. He said he hopes the case results in more states passing bills that prohibit abortion “once the unborn child can feel pain.”


Supporters of legalized abortion said the case offered a preview of what poor, desperate young women could face if abortion is driven underground with more restrictive laws.


“Kermit Gosnell has been found guilty and will get what he deserves. Now, let’s make sure these women are vindicated by delivering what all women deserve: access to the full range of health services including safe, high-quality and legal abortion care,” said Ilyse G. Hogue, president of NARAL Pro-Choice America.


During the trial, Gosnell proved a solitary figure from beginning to end, with no friends or relatives in the courtroom, despite the fact he’s been married three times and has six children, nearly all of them adults.


Gosnell did not testify, and called no witnesses in his defense. But McMahon branded prosecutors “elitist” and “racist” for pursuing his client, who is black and whose patients were mostly poor minorities.


“I wanted to be an effective, positive force in the minority community,” Gosnell told The Philadelphia Daily News in a 2010 interview. “I believe in the long term I will be vindicated.”


Gosnell was also convicted of infanticide, racketeering and more than 200 counts of violating Pennsylvania’s abortion laws by performing third-term abortions or failing to counsel women 24 hours in advance.


The defense also contended that the 2009 death of 41-year-old Karnamaya Mongar of Woodbridge, Va., a Bhutanese immigrant who had been given repeated doses of Demerol and other powerful drugs to sedate her and induce labor, was caused by unforeseen complications and did not amount to murder, as prosecutors charged.


Bernard Smalley, a lawyer for the woman’s family, said he now hopes to bring “some sense of justice and quiet to this family that’s been through so much.”