STOCKTON — Two best friends delivered for the St. Mary’s boys basketball team on the biggest night of their young careers.

As a result, the Rams are on the verge of a Northern California championship.

No. 2 St. Mary’s nipped No. 3 Moraga-Campolindo 67-65 in a CIF NorCal Division II semifinal Tuesday night at Delta College, behind a combined 48 points from juniors Carson Simi and Bryce Johnson.

Johnson, who finished with 20 points and 19 rebounds, assisted Simi, who posted a team-high 28 points, on a 3-pointer with 30 seconds to go that would be the eventual game-winner.

Simi carried St. Mary’s mostly-stagnant offense with 16 points in the first half (and 13 in the second quarter alone) and buried the Cougars (21-11) in the fourth.

“He stepped up early,” Rams coach Ken Green said, his voice momentarily breaking with glee, “and he stepped up late.”

St. Mary’s advances to face No. 1 Alameda — a 66-60 winner over fifth-seeded Sacramento-Grant on Tuesday — in the Division II finale at 6 p.m. Saturday.

After Simi’s clutch 3-pointer, Cougars sophomore Carter Mahaney drilled a 3 of his own and was fouled, eliciting a loud “no!” from the Rams bench. But Mahaney missed the free throw, leaving St. Mary’s ahead 66-65.

St. Mary’s managed to drain the clock, and Johnson was sent to the foul line with 7.3 seconds to go after botching a dunk, grabbing the rebound and missing a shot as he was fouled.

Johnson sank the second of two free throws, and ripped away a steal to Tre Jenkins as the clock expired.

The moment sent a raucous Blanchard Gym crowd into celebration mode. Rams guard Tom Rigdon sprinted into the “Green Machine” student section, while Johnson simply stood in the key with his arms raised in triumph.

St. Mary’s labored early on, falling behind 9-1 early and 17-8 after the first quarter as the Cougars carved through the defense. Mahaney paced the Cougars with a team-high 28 points.

“To the credit of Campolindo — who is really good, and was making shot after shot — it wasn’t from lack of effort,” Green said of his team’s early struggles. “They were just getting to their spots and hitting contested shots.”

It’s the third time St. Mary’s has appeared in the NorCal semis in the past four years, but the first victory in that stretch. Modesto Christian beat St. Mary’s in 2015 and Palo Alto beat St. Mary’s in 2017.

The Rams won the 2006 NorCal championship under Green, an alumnus of the school.

Every round of the state playoffs has been hectic for St. Mary’s (26-8), which edged No. 15 Fresno-Sunnyside 62-59 and then No. 10 Hayward-Moreau Catholic 72-68.

Yet again, the Rams wouldn’t relent.

“We hung in there,” Green said. “We trusted each other.”