STOCKTON — How did that happen?

No, seriously, just how did that happen?

The simple explanation: The arm of Noah May, the hands of Joe Fontes and the foot of Eddie Sanchez.

Add them together Friday night and somehow the scoreboard read "St. Mary’s 30, Sheldon 29" after a stunning finish to a game that — let’s be honest — the Rams had seemingly choked away.

St. Mary’s (7-4) does indeed advance in the Sac-Joaquin Section Division 1 playoffs next Friday against powerhouse Folsom. The outcome left Rams’ Coach Tony Franks more than a little shocked.

“Yeah, you think about all those lost fumbles (5 of them) and about the (9-point) lead that got away in the fourth quarter,” Franks said. “There is less than a minute left and it looks pretty bleak.

“But we get to stay together as a group for another week. They found a way to win the game. It was dramatic and hard to describe. But I’m very proud of them.”

The anatomy of this shocking outcome started with Noah May’s arm.

Sheldon (10-2) had pulled ahead 29-23 on Michael Graves’ 25-yard touchdown reception from Francisco Salinas with 54 seconds remaining.

May brought the Rams to the line of scrimmage, almost 70 yards from the end zone.

The junior splits the quarterback duties with sophomore Michael Chavez, who is a better runner. May’s passing ability would be needed on this drive. He completed a couple of short passes, but St. Mary’s needed bigger chunks of yardage.

Tick, tick, tick … Time was scarce.

May dropped back to pass and seemed hemmed in by a Sheldon defender. But he summoned whatever elusive running ability he has to juke the linebacker, giving him time set himself to throw.

“That really was the key on the play, to get free so I could step into the throw and Joe could get behind the defender,” May said.

Step into it he did. The line of scrimmage was the Sheldon 46, but May launched the ball from midfield. The spiral rode through the crisp night air before setting in …

The hands of Joe Fontes.

Fontes, a 175-pound senior, is fast, reliable, runs good patterns and has solid hands.

He nestled the ball into his arms and fell backward into the end zone.

“We have a lot of faith as a team and we stay together until the end,” Fontes said. “I knew Noah would give one of us a chance to make a play.

“As the ball was coming toward me, I could tell it was going to be (on target) and I could feel that I was behind the defender.”

The unexpected play caused the St. Mary’s sideline to erupt in celebration and some players raced onto the field.

One problem. The touchdown only tied the game at 29-29. That would leave things up to …

The foot of Eddie Sanchez.

St. Mary’s hurt itself all night with penalties. And an unsportsmanlike conduct penalty for excessive celebration meant the possible winning extra point would be 35 yards instead of 20.

Sanchez, however, was pure under pressure. His right-footed kick was true, making it 30-29 with only 16 seconds left. The Rams’ defense held, including a sack on the final play.

“Eddie’s just a heck of a kicker and he was so calm under pressure,” Franks said. “Yeah, we made it tough on him. But he never wavered.

The celebration of a win for the ages can’t last forever. Ultimately, the Rams’ attention must turn to Folsom, which mauled Edison on Friday night.

“We get to play Folsom, we don’t have to play Folsom,” Franks said. “That’s the way I look at it. We get to play a great team. And it seems we always are playing Folsom in the playoffs — a couple times in section finals.”

St. Mary’s has won seven straight since a string of humbling losses to start the season against the likes of powerhouses Pittsburg and Mater Dei.

“We are a different team than we were back then,” Fontes said. “We have grown a lot and become more confident. You could see that in the way we overcame adversity tonight.”

And regardless what happens at Folsom, Friday night’s Houdini act was a memory maker that will stay with the 2018 Rams for a lifetime.