BANGOR — Jake Lapierre made two of the biggest plays of his basketball career, and they came within 23 seconds of each other.

First, Lapierre made a steal with 23 seconds left to give Winslow the ball down one point to Oceanside. After a timeout with 17 seconds to play, Lapierre scored on a putback as time expired, giving the Black Raiders a 39-38 win in the Class B North quarterfinals at the Cross Insurance Center.

“The rebound came down and it was the final chance to do anything. I just went up for it, got my hands on it, and it went right up over the rim and in,” Lapierre said.

No. 4 Winslow (16-3) moves on to the semifinals Wednesday night against No. 1 Hermon. No. 5 Oceanside finished 13-6.

Winslow trailed 38-35 with a minute to play. A Jack Morneault bucket with 57 seconds left after an Oceanside turnover cut the Mariners’ lead to one. The Black Raiders were in a trapping defense to force the turnover.

“We had a zone trap on so we’re trying to get the ball in the corners. We didn’t want to foul,” Winslow Coach Ken Lindlof said. “We needed to step up and make plays defensively at the end to give ourselves a chance to do something.”

With Winslow’s guards causing havoc in the backcourt, Lapierre sat in the middle of the zone in back, with one Oceanside player between himself and the basket. When the Mariners tried to break the pressure with a lob pass, Lapierre was ready for it.

“I was the last one back, and the lob kind of went over my head. I did everything to get up and grab it, and get it to one of my guards. We needed that stop,” Lapierre said.

After advancing the ball over midcourt, Winslow called a timeout to set up its final scoring opportunity.

Lapierre said the play originally called for somebody to come off a screen to get the ball, with Lapierre posting up underneath. When that was clogged, Lapierre cleared out. That gave Hunter Campbell room to drive the lane and take a shot with approximately four seconds left.

Campbell’s shot came off the rim to Lapierre, surrounded by Oceanside defenders, who may also have gotten a hand on the ball. Lapierre knew he had time to get off one last shot.

“We passed it around the perimeter until we could find a shot. Then the final shot happened, and the final rebound happened,” Lapierre said.

Added Lindlof: “Fortunately we had pretty good spacing. Hunter was able to take the ball. He got a good look. Then Jake put it in. That seemed like the only thing that went in the whole second half for us.”

A Lapierre 3-pointer with just over a minute left in the second quarter gave the Black Raiders a 26-12 lead. Winslow turnovers in the final minute of the first half helped Oceanside score four points and cut the halftime deficit to 26-16, and the Mariners maintained momentum deep into the third quarter. Oceanside opened the second half with a 9-0 run to pull within 26-25 with 2:45 left. A Campbell layup finally broke Winslow’s cold streak.

“That was a function, I think, of us. They got a little renewed at the end of the half because they turned us over and had a little momentum,” Lindloff said. “Nothing seemed to go really well for us. Even when we got good looks, we didn’t convert.”

Michael Norton scored seven of his game-high 13 points in the third quarter, including a 3 at the buzzer to send the teams to the fourth quarter tied 28-28.

Lapierre said he wasn’t surprised by the Mariners’ comeback. The teams split a pair of games in the regular season, and Oceanside beat Winslow last week in the Kennebec Valley Athletic Conference Class B title game.