OCEAN CITY — Mainland Regional head baseball coach Billy Kern is one wily son-of-a-gun. Kern, also an assistant coach with the Mustangs’ girls basketball program, came up with an inbounds play a few years ago that head hoops coach Scott Betson has kept in his pocket, just waiting for the right time to pull it out and put it on display.

That moment came with 1.1 seconds left in the Cape-Atlantic League semifinals on Thursday night at Ocean City High School with the fourth-seeded Mustangs holding a precarious two-point lead on top-seeded Wildwood Catholic after Crusaders star Marianna Papazoglou nailed a 3-pointer with less than two seconds remaining. Mainland junior Lila Schoen stood to the right of the basket to inbound the ball, knowing the Crusaders had to foul immediately to have any chance. But with nobody guarding her, senior Kylee Watson stepped out of bounds along the baseline, and Schoen passed the ball to her. Watson immediately inbounded back to an unguarded Schoen, who was all alone as the final second ticked off the clock, preserving Mainland’s 42-40 victory.

The Mustangs (18-5), the 2018 tournament champion, advance to Saturday’s noon final at Stockton University against Atlantic City, a 40-33 winner over No. 2 seed Ocean City in the other semifinal.

“Coach Kern found that for me a couple of years ago and we’ve played with that in practice. That’s something that we’ve run,” Betson said. “Coming out of the timeout, we talked about how if they were going to take a defender away from the inbounder, we were just going to step back and throw it right back. It worked. It always looks great when it works.”

Mainland went into halftime holding a 19-14 lead and went up 22-14 when Madi Hafetz nailed a 3-pointer early in the third quarter, and it looked as though the Mustangs might go on a run similar to the one they had in the first half, when they scored 17 straight points to wipe out an early 9-2 deficit. But Wildwood Catholic (22-4) kept hanging around, getting big baskets from Papazoglou and Gabby Turco, who combined to score 29 of the Crusaders’ 40 points. Turco stole the ball and midcourt in the waning seconds of the third quarter and then banked in a 3-pointer to tie the game, 34-34, heading into the fourth.

But Mainland kept getting big plays on offense from sophomore Cadence Fitzgerald, and some solid defensive work from fellow sophomore Kaitlyn Boggs, who finished with eight points, seven rebounds, two assists and two blocks. Fitzgerald, who has come on strong since entering the starting lineup in January, scored a team-high 14 points, including a pair of free throws and then a runout basket off a pass from Kylee Watson to turn a 38-37 lead into a 42-37 advantage in the final 1:31.

“She’s a kid we’re super proud of,” Betson said of Fitzgerald. “She was a JV kid last year who was thrust into a major starting role in major games like this, and it seems like she gets better every day. She’s very aggressive. Her athleticism is what has made her a player, and she’s not going to abandon that in the times when she needs it most, and we saw that tonight.”

“Wildwood Catholic is a great team, it’s a lot of fun to play against them and it was a great atmosphere here. It was so much fun,” Boggs said. “I just try to put it all out there and give it 100 percent. Even if I’m not making shots, I want to make up for it in some other way, and defense is very important. Getting rebounds is also extremely important. And if someone is down and not making shots, it really helps to get the rebound and start the play over again.”

Betson said he knew it was going to come down to the wire because Papazoglou (15 points) and Turco (14 points) are such talented scorers, and guard Kimmy Casiello also added nine points.

“I figured it would probably be a single-digit game one way or the other,” Betson said. “They are a good team that has two kids who can just flat-out score. We were a little sloppy on offense, but I was really happy with the way we played defense tonight.”

On Saturday, Mainland will take on an Atlantic City team the Mustangs beat 49-40 back on Jan. 15. The Vikings are making their first appearance in a CAL title game since 2010.

“It’s so exciting. This was one of our goals, something we’ve wanted all season, so it’s awesome to be here,” Boggs said. “The atmosphere and having everyone here cheering us on, it was awesome to play here. We definitely have something to prove, but I think we can do it. Atlantic City is a really tough team, they are very athletic. They’re also a great team, so I think it will be a lot of fun.”

Contact Dave O’Sullivan: sully@acglorydays.com; on Twitter @GDsullysays