STOCKTON — For the third season in a row, the St. Mary’s girls basketball team’s quest for a state championship has ended in the regional semifinals. And for the second time in three seasons, it ended at the hands of Los Altos Hills-Pinewood High.

The Rams came almost all the way back from a 19-point deficit to pull within a point in the final minute of play, but couldn’t finish things off in a 59-56 loss in the CIF NorCal Open Division semifinals held Tuesday at Delta College's Blanchard Gym.

St. Mary’s finishes its season with a 27-3 record, not to mention a Sac-Joaquin Section Division I championship. It’s the second time the Panthers have ended the Rams’ season, with Pinewood beating what was a national No. 1 St. Mary’s team two years ago, a squad that was both the reigning state champion and winners of 57 consecutive games.

That 2016 loss was a tight game all the way through, with the Rams leading by six at the half, but succumbing to a second-half surge by Pinewood. For three quarters Tuesday, things were a much different story.

last minute of 1Q

— Nick Woodard (@nwoodard25)March 14, 2018

Pinewood jumped out to an 8-4 start in the first quarter, which prompted St. Mary’s to call a quick timeout. It ballooned to a 22-11 Panthers lead with 1 minute, 32 seconds left in the quarter, and was as large as 39-20 in the second.

Final minute of 2Q

— Nick Woodard (@nwoodard25)March 14, 2018

Nicole Young hit a three-pointer and then took a charge to spark a 7-0 Rams run to finish the half, leaving St. Mary’s down 39-27 at the break. The Rams traded buckets with Pinewood for most of the third, but couldn’t get the deficit down to single digits.

End of third quarter

— Nick Woodard (@nwoodard25)March 14, 2018

Something clicked for St. Mary’s after a passionate speech from head coach Tom Gonsalves between quarters. The Rams rattled off a 9-0 run, complete with Aquira DeCosta dominating both the offensive and defensive glass and a rejuvenated, swarming St. Mary’s defense.

“They started getting after us and trapping,” Pinewood coach Doc Scheppler said. “We turned it over a couple of times, and they got some offensive putbacks.”

A 5-3 swing made things 57-52 with four minutes to go in the game, but the St. Mary’s defense wouldn’t quit. It forced a shot-clock violation, and four straight points from DeCosta made this game 57-56 with 1:15 remaining.

The Rams had a chance to tie, or potentially take the lead at the free-throw line with less than a minute to go, but both shots missed. They had no choice but to foul, and Pinewood hit both. A last-second shot couldn’t find the net, and St. Mary’s season was over.

End of game

— Nick Woodard (@nwoodard25)March 14, 2018

“They’re a great team, very athletic,” Scheppler said. “They played hard and got after us. We just had enough to hang on.”

The game was also the last for the senior trio of DeCosta, Neenah Young and Ariel Johnson, who will all be headed to Division I schools to continue their careers as collegiate athletes. DeCosta will go on to play at Baylor, Young at Princeton and Johnson at Florida.

Gonsalves was not available for comment after the game.