Moore Catholic went up 1-0 in its best-of-three series with St. Francis Prep.Denis Gostev

Dom Casella was coming in with zero margin for error. St. Francis Prep had already scored twice in the fifth inning to take a lead and the Moore Catholic right-hander was facing a bases-loaded, one-out jam before ever throwing a pitch.

Casella has started games this year and tossed gems. But the senior flamethrower’s mentality is more like a closer.

“I really don’t mind coming out of the ’pen,” the intense Casella said. “Whenever I come out of the ’pen, I’m all pumped up. I think my team needed a little of that today, a little pump up.”

He got two straight ground outs, limiting the damage to just one more run. Moore took the lead on a Chris Goetz bases-clearing double in the bottom of the inning and the sixth-seeded Mavericks went on to beat No. 12 St. Francis, 4-3, in Game 1 of a third-round, best-of-three qualifying series for the CHSAA Class AA championship tournament. Casella came in throwing gas and was perfect in 2-2/3 innings with a pair of strikeouts.

“We finish the [fifth] inning and he comes in and fires up the team and everything,” Goetz said.

It was a serious psychological boost. Moore (11-5) was up 1-0 on a Matt Kostalos RBI ground out in the third. But SFP (10-9) started the fifth with a single by pitcher Sam Gaitan and Gabriel Gonzales and Steven Pelan followed with bunt singles past starter Shea Spitzbarth. Thomas McKenna drove in Gaitan with a fielder’s choice and Jordan Colflesh plated Gonzales with a line-drive single up the middle to make it 2-1 Prep. After Spitzbarth walked Navy-bound slugger Chris Cannon, Moore coach Nick Doscher called on Casella.

“We didn’t want the snowball effect,” Doscher said. “A couple things went against us, let’s keep it to a minimum.”

Casella got Jason Perrone to ground to second, which drove in McKenna, and Danny Finn did the same. When Casella got the third out, he pumped his fist.

“That was the key, keeping it to 3-1,” Doscher said.

Boosted by the performance, the Mavs lineup came out slugging in the bottom half. Joe Todaro ripped a double to the left center gap, Anthony LoBello sliced a single to right and Kostalos walked. Goetz brought them all home with a ringing double to center.

“I kinda knew it was coming down to me,” Goetz said. “I had to stay confident, just look for the right pitch. The pitch was right down the middle. … Usually in big games, it comes down to me pretty much all the time.”

This one was huge, too. Moore did not want to go down 0-1 with Monday’s Game 2 at 3:30 p.m. at St. John’s University, which is five minutes away from St. Francis Prep in Queens. The two programs might be from different boroughs, but there is a rivalry. They always seem to meet in the postseason. Moore beat SFP, 1-0, for the CHSAA title back in 2005 on Doscher’s son Nick’s solo home run.

“Our history with these guys, it’s always a battle no matter what year it is,” Doscher said. “It’s always intense. These aren’t the same players, but the coaches remember.”

The Mavericks hope Casella pumping his fist and retiring the final eight Prep batters is the lasting memory of this series.

“I was real fired up,” Casella said. “Coach told me, ‘Put it away.’ I just came in there and did what I had to do.”