HERSHEY — The outcome was decided long before the clock reached zeroes, but Upper St. Clair coach Pete Serio insisted the lopsided score couldn’t drain the emotion out of Friday’s loss.

He knew an era was ending.

“I was going to get emotional whether we won or lost because I knew it was over,” Serio said after Upper St. Clair lost to powerful Perkiomen Valley, 58-27, in the PIAA Class 6A girls final at Giant Center. “Yeah, it hurts to lose like that. But to me, it’s about the six seniors, and it’s over.

“And it’s me too.”

The WPIAL champions are losing an accomplished senior class led by Kent State recruit Rylee Kalocay, and Serio shared that he’s also stepping down as coach after 11 seasons with the Panthers.

It comes a month after winning a WPIAL title.

“I love these kids,” Serio said. “What a ride they’ve given me this last year. I’m so glad they talked me into coming back. We’ve had so much fun. I know that’s why we’re so upset.”

But their ultimate storybook ending wasn’t to be.

Upper St. Clair made only nine baskets against a fierce Perkiomen Valley defense on a tough scoring night that quickly doomed the Panthers’ state title hopes. The District 1 champion led by 18 points at halftime and brought on the 30-point mercy rule late in the third quarter.

The Panthers trailed 30-12 at half. They were held to quarter totals of seven, five, seven and eight points.

“Our goal was to play until we couldn’t anymore,” Kalocay said of stretching her senior year. “Sure, it didn’t end up the way we wanted, but we played until we couldn’t. That’s really all you can ask for.”

This was USC’s second matchup this season with Perkiomen Valley. The Panthers lost by six points when they hosted the team from Montgomery County in December.

This time, the Perkiomen Valley upped its defense and Upper St. Clair shot only 23% from the field (9 for 38). The Panthers went 3 for 17 from beyond the arc.

Kalocay led with 10 points on 3 of 17 shooting.

“The way they played against us in December and from the film I’ve watched, that’s the best defense I’ve seen them play all year,” Serio said. “They were all over the place. They were everywhere.”

This was the first PIAA title for Perkiomen Valley (28-3), which was making its state finals debut. Upper St. Clair (23-7) was there for only the second time after winning a Class 4A title in 1999.

Quinn Boettinger, a 6-foot-3 senior and Navy recruit, led Perkiomen Valley with 16 points. Senior Grace Galbavy, a 6-foot guard headed to Wake Forest, scored 14 points.

Perkiomen Valley shot 47%.

“That team is really good,” Serio said. “I knew it. I didn’t want to say it and have a defeatist attitude going in, but they’re really good. They have two Division I players and two Division II players. They have four scholarship players, and they shot the crap out of the ball tonight.”

Boettinger went 8 for 14 shooting, and Galbavy made 7 of 13.

Perkiomen Valley coach Jon Russo said he used that early season visit to Upper St. Clair as essentially a scouting trip. Russo said he considered the Panthers to be a top four team in the state, so he was anticipating a playoff rematch.

“I knew we might see them again, so I told the girls we weren’t game planning, we’re just playing basketball,” he said. “Let me get my eyes on them and figure out what I can do to help you next time we see them.”

Russo said his team’s defensive focus was on limiting Upper St. Clair’s looks at 3-pointers. Perkiomen Valley decided it would rather USC face Boettinger in the paint.

“We figured if Kalocay can beat us going to the basket over and over again, we lose,” Russo said. “But if we can take away their 3s, we feel like our team can outscore anybody with 2s. You have to hit 3s to beat us.”

Perkiomen Valley had a 36-12 edge in points in the paint.

But the Vikings also had a 16-3 advantage in second-chance points and led 17-2 in fast-break points.

“Once things started going poorly, we never seemed to recover,” Serio said. “We never got that momentum boost that we kind of needed.”

Serio, 65, went 152-104 in 11 seasons at Upper St. Clair, where his wife Suzie McConnell-Serio was his top assistant for the past seven years. He previously coached at Bishop Canevin, Mt. Lebanon and Peters Township, compiling 299 career wins.

“He tried to get loose last year but we wouldn’t let him,” Kalocay said. “We wouldn’t let him leave without a gold WPIAL medal. It’s been our goal for the longest time.”