HARRISBURG, Pa. — A county judge should not have decided a girl could not have an abortion simply because the teen did not tell her mother she was pregnant, the Pennsylvania Supreme Court ruled Thursday as it clarified how minors can obtain the procedures.

The high court said an Allegheny County judge should not have based his decision denying court permission for a minor to have an abortion — called "judicial bypass" — on a 17-year-old's desire to keep her condition a secret from her parent.

The 1982 state law states that if a pregnant girl under 18 cannot get her parents' consent, or if she does not want to seek it, a judge can authorize an abortion after determining she is "mature and capable of giving informed consent."

The 6-1 decision Thursday reversed a Superior Court decision that upheld the lower court judge.

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

The ruling calls the woman in the case "Jane Doe" and does not name the judge. A Supreme Court clerk in Pittsburgh said briefs in the case were sealed and not available for public inspection.

Baer wrote that Jane Doe applied for the judicial bypass in March 2010, saying she was three months shy of turning 18, 10 weeks pregnant, and a high school senior with average grades who planned to go to college and hoped to become a lawyer.

She told the county judge she was concerned her mother would throw her out if she learned of the pregnancy, and that she had no relationship with her father.

When her lawyer asked the judge why he denied her application, the decision says the judge replied that if the judicial bypass was used any time a minor was worried her parent would be disappointed in the decision to have an abortion, "I can't imagine that any parent is going to receive news that their child has an unplanned pregnancy."

The trial judge later wrote that other grounds for his ruling she was not "mature and capable of giving informed consent" were that she had average grades, used improper grammar during the hearing, lacked work experience, was not familiar with personal finances, lacked prior significant decision-making and was accompanied by her mother when traveling abroad.

The high court decision also ruled that appeals courts, when reviewing county court decisions on judicial bypass requests, should determine whether a judge abused his or her discretion.

In a dissent, Justice Joan Orie Melvin said she would have upheld the county judge.

"It was her reason for not seeking parental consent and not the fact that she elected not to seek consent that properly formed but one of many factors bearing upon the trial court's maturity assessment," Melvin wrote.