There was no shortage of red flags about what was allegedly going on in the three-story brick building on a bustling stretch of Lancaster Avenue in West Philadelphia.

A routine inspection of Kermit Gosnell’s abortion clinic had turned up problems as early as 1989, according to official reports. More recently, hospital workers and attorneys had repeatedly contacted state health officials with disturbing reports about women who had contracted the same venereal disease after visiting the clinic; a 14-year-old girl who had had an illegal abortion at 30 weeks of pregnancy; and a 41-year-old Virginia woman who had died after an abortion.

But it wasn’t until 2010, when authorities raided the clinic over its distribution of painkillers, that authorities uncovered evidence that led to Gosnell’s capital murder trial, which started in March. Gosnell faces seven first-degree murder charges resulting from the deaths of babies whose spinal cords he allegedly severed after they were born alive. He is also charged with third-degree murder in the death of the Virginia woman, Karnamaya Mongar.

The prosecution rested Thursday after weeks of testimony from former employees who reported seeing babies moving and breathing after they were delivered. Gosnell or other workers would then cut their necks, the witnesses said. Jurors also heard about the allegedly unsanitary conditions from Mongar’s relatives.

Gosnell’s attorney has said that no live births took place and that Mongar suffered from respiratory problems. Gosnell could face the death penalty if convicted.

See abortion laws by state

The case has captivated and repulsed a nation where ­back-alley abortion clinics have become a rarity since 1973, when the Supreme Court legalized abortion. The catalogue of horrors delineated by prosecutors has raised questions about whether there is adequate inspection and regulation of the 1,800 facilities nationwide that provide abortions.

The rules governing abortion clinics vary widely by state and invariably become tangled in the issue’s incendiary politics, with supporters of abortion rights often complaining they are too onerous and abortion foes calling for ever-stricter guidelines.

Abortion rights advocates note that Pennsylvania has strict laws governing abortion clinics but that they were not enforced. They say that Gosnell’s case is rare and that abortions are among the safest of medical procedures.

But abortion foes say the case has been a wake-up call about the lack of oversight and the potential for abuse in abortion facilities.

“This is our Sandy Hook,” said Troy Newman, president of Operation Rescue, an antiabortion activist group, referring to the mass shooting in Connecticut that led to unprecedented calls for gun regulations. “Because of Gosnell, I am hoping and praying and working toward raising the public awareness that abortion mills need to be regulated, inspected, licensed, at the very least like your local breakfast place.”

Pennsylvania Gov. Tom Corbett, a Republican, has called the lack of oversight by state officials “despicable.” He fired or suspended some workers for negligence after the grand jury investigation, and others have resigned. Corbett also announced that abortion clinics throughout the state would be subject to annual inspections, as well as periodic unannounced visits.

Activists on both sides of the issue say the conditions inside Gosnell’s clinic were the worst they’ve seen. He is accused of a litany of atrocities at the West Philadelphia Women’s Medical Society, including his “snipping” technique, in which he allegedly severed the spines of babies who had been born during abortion procedures. Fetal remains apparently were stored in jugs and bags, and authorities described the clinic as filthy. Cats were permitted to roam freely inside.

About half of states — most Republican — have specific rules that apply to abortion clinics, while the rest hold abortion providers to the same standards as other medical professionals, according to the Guttmacher Institute, an abortion rights think tank. Some states require providers to have admitting privileges at local hospitals. Others have strict staffing and construction rules.

Many are so demanding that clinics cannot comply. On Monday, a judge halted a Mississippi law that would have shut down the state’s only abortion facility.

Maryland adopted regulations last year requiring abortion clinics to be specially licensed and inspected, in response to a widely publicized botched abortion in Elkton. The state last month suspended the licenses of three clinics, which have since been reinstated. Virginia approved rules this month requiring abortion clinics to adhere to hospital-like standards, leading at least one clinic to decide to close. The District does annual visits to abortion clinics as part of routine health inspections.

Abortion rights advocates say that they support regulations and inspections for abortion clinics but that providers should not be singled out for special scrutiny. They say abortions are generally safe. According to the Centers for Disease Control and Prevention, 10 women died after having abortions in 2010, the most recent year for which CDC has data. By comparison, 793 people died in bicycle accidents that year.

Abortion rights advocates say that many of the rules adopted in the states are not meant to promote abortion safety but to shut down clinics.

David Grimes, former head of the CDC’s abortion surveillance branch, said clinics like Gosnell’s were commonplace before Roe v. Wade, the court case that legalized abortion. Today, the problem of substandard clinics is so small that the branch, which investigated problem clinics, no longer exists, he said.

“The legalization of abortion stands out as a public health triumph,” he said. “Over 1,000 women died every year from illegal abortion in the 1940s. Now it’s less than a handful a year. That’s the story, not one aberrant doctor in Philadelphia.”

But critics say the Gosnell case shows what can happen without close oversight.

The grand jury that indicted Gosnell also excoriated several oversight agencies for failing to crack down on his clinic. In the grand jurors’ 2011 report, they called the failure a “complete regulatory collapse.”

The report details how the Pennsylvania Department of Health issued approval for Gosnell to open the clinic in 1979. The next site review came a decade later, and while numerous violations already were apparent, “Gosnell got a pass when he promised to fix them,” the report states.

The same report found that the Pennsylvania Department of State also could have put a stop to Gosnell. Nearly a decade before his arrest, the report states, a former employee presented the Pennsylvania Board of Medicine with a complaint “that laid out the whole scope of his operation,” from unsterile conditions to underage patients to over-prescribing of pain pills.

Soon after, the department received another report about a woman who died of sepsis after Gosnell perforated her uterus. In addition, a city health department worker who came to the clinic as part of a vaccination program reported appalling conditions. But her reports “went into a black hole,” jurors found.

“Bureaucratic inertia is not exactly news. We understand that. But we think this was something more,” the grand jury wrote. “We think the reason no one acted is because the women in question were poor and of color, because the victims were infants without identities, and because the subject was the political football of abortion.”