The Pennsylvania Supreme Court on Thursday ruled that two lower courts were wrong to deny a pregnant teenager permission for an abortion.

Pennsylvania's abortion law requires that a female under 18 get consent for an abortion from a parent or, if she wants to bypass her parents, from a county judge.

A confidential "judicial bypass" must be granted if the judge finds the teenager mature and capable of giving informed consent.

In March 2010, an Allegheny County judge refused to let a teenager get an abortion without telling her parents, concluding that the fact that she didn't tell her mother meant she was too immature to have the abortion.

The teen, who was three months shy of her 18th birthday, appealed to Superior Court, which upheld the judge, identified by the Pittsburgh Post-Gazette as Philip Ignelzi.

The Supreme Court on Thursday said that the ground for denying the bypass made no sense and that the county judge had abused his discretion.

"Every minor who seeks judicial authorization for an abortion does so because she lacks or elects not to seek parental consent," the high court wrote. "Thus, a minor's failure to consult with . . . her parent cannot serve as the basis for denying a petition."

Richard Marvin, chief of the Office of Conflict Council of Allegheny County, which provided pro bono legal representation to the teen, said he was pleased.

The original decision "was totally illogical," Marvin said. "We though this was an important issue and that the situation could occur again, and it should have some [legal] guidance."

For the young woman in the case, referred to as Jane Doe, the decision was moot. When she was denied a bypass, she confided in her mother and went ahead with the abortion.

Because bypass proceedings are confidential, it is highly unusual for any records to become public.

Also, judicial bypasses are almost always granted in states that require them because of the legal framework set by the U.S. Supreme Court.

The nation's high court said that in light of the "grave and indelible" consequences of denying the right to an abortion, a minor must be given an alternative to involving her parents, such as a judge's approval.

If the minor shows she is mature, the judge must give permission regardless of the judge's personal view as to her best interests; even an immature minor must be given permission if she shows that the abortion is in her best interests.

Jane Doe told Ignelzi that she was "not physically, mentally, or emotionally ready for this baby," was unemployed, and planned to attend college after high school, and that she feared her mother would "throw her out" if she discovered the pregnancy, according to the Supreme Court's ruling.

In finding the teen immature, Ignelzi also cited her high school grades; her improper use of English during the hearing; her lack of work experience outside the home; and her unfamiliarity with personal finances.

When the Supreme Court agreed to consider the case early this year, it asked three outside groups - the American Civil Liberties Union, the state attorney general, and two antiabortion organizations - to offer opinions about a the proper legal standard for such a review.

Under one standard, the seven justices would consider only whether the lower court judge abused his discretion.

Under another standard, the justices could draw their own conclusion about the teen's maturity even if that meant holding a new hearing.

Randall Wenger, chief counsel of the Independence Law Center, which represented the antiabortion groups, argued for the former standard - the one the justices used.

Wenger on Thursday refused to express an opinion about the high court's decision.

"To some extent, I prefer to stay out of it," Wenger said. "Our primary concern was the more esoteric issue of what's the appropriate standard of review."

Contact staff writer Marie McCullough at 215-854-2720 or mmccullough@phillynews.com.