"There is no dispute that the charter school signed the 2005 charter," Justice Seamus P. McCaffery wrote in an opinion posted Tuesday afternoon on the court's website. "By doing so, it agreed to all the terms of the charter, including the enrollment cap."
The decision buoyed the district, which has been trying to manage charter-school costs and has been battling Palmer Leadership for nine years over enrollment.
"We are extremely pleased by this outcome," Michael A. Davis, the district's general counsel, said in a statement. "This is a great outcome for the school district. We will be reviewing the opinion closely."
The lead attorney for Palmer Leadership declined to comment.
The K-12 school has almost 1,300 students, nearly double its allotment, on campuses in Frankford and Northern Liberties.
The charter had argued that, although it had signed a five-year charter in 2005, the SRC had unilaterally imposed the cap in a resolution and that the charter had never agreed to it.
A 2008 state law bars districts from capping charter enrollment - unless the school agrees to it.
In its charter-renewal application in 2005, Palmer Leadership asked for more students. The SRC denied the request and noted that the school had not met the state's academic benchmarks.
In its opinion, the state Supreme Court noted that the school had consistently enrolled extra students, which the district refused to pay for.
The school's average daily attendance was 732 in 2008-09 and 765 in 2009-10.
Palmer Leadership turned to the state Department of Education for help.
The state education secretary in 2011 said the charter was entitled to receive $1.3 million for those two years. And using a provision in the state charter law dealing with enrollment disputes, the secretary deducted the money from the district's share of state funds and sent it to Palmer Leadership.
In 2012, the Commonwealth Court affirmed the secretary's actions.
The district appealed to the state Supreme Court. The justices agreed to examine only the narrow question of whether Commonwealth Court was wrong when it affirmed the education secretary. The Supreme Court heard oral arguments in March.
In Tuesday's opinion, the court said the terms of Palmer Leadership's charter made it "unmistakably clear that the charter school agreed to the enrollment cap as part of a legally binding agreement."
And the high court looked askance at Palmer Leadership's assertion that it had shown its "lack of acquiescence to the cap" by enrolling more students.
McCaffery wrote that the charter's practice of admitting more students "shows only that the charter school intentionally failed to abide by the legally binding agreement it had signed."