WATERVILLE — After losing to Waterville twice in the regular season, Oceanside pulled away in the fourth quarter Tuesday night, taking a 48-39 Class A North girls’ basketball preliminary-round win.

No. 10 Oceanside (8-11) will face No. 2 Skowhegan (14-4) in the Class A North quarterfinals at 4:30 p.m. Friday at the Augusta Civic Center. No. 7 Waterville ends the season at 9-10.

Oceanside Coach Samantha Bragg said she saw better intensity from her team in a loss to Gardiner in the regular-season finale, and that carried over into Tuesday’s game.

“Even though we lost to Gardiner, the intensity I’ve been trying to find all season has finally shown up. And it couldn’t have happened at a better time, for sure,” Bragg said. “They kind of know now, we win or we don’t play anymore.”

The Mariners lost to the Purple Panthers last season in the Class A North preliminary round, and many of the Mariners were members of the Oceanside soccer team that lost to Waterville in regional semifinals. Those games, combined with Waterville’s two wins over Oceanside in the regular season, had the Mariners wondering what they had to do to beat the Panthers.

“Waterville’s kind of in the back of your head the whole time. It was nice to make it here and get the color purple out of the way,” Oceanside junior Gabby Simmons said.

The Mariners played play excellent defense, forcing Waterville to settle for perimeter shots throughout the game.

“Once we didn’t see the first couple shots go down, we started to panic,” Waterville Coach Rob Rodrigue said. “The first two nights we hit shots. Tonight, we didn’t hit shots.”

Oceanside scored the first seven points, and after Simmons made a 3-pointer to give the Mariners a 7-0 lead two minutes into the game, Rodrigue called timeout. Waterville settled down and scored the next 11 points, but the quick start gave the Mariners confidence, which they carried through the rest of the game.

“Just coming into Waterville, we were really timid, not really sure what our purpose here was,” said Simmons, who scored a team-high 16 points. “I think moving the ball around, really being confident in our teammates kind of helped. Intensity at the beginning of the game helped.”

The Mariners led 22-19 at the half, and Waterville tied the game 26-26 on Sadie Garland’s basket with 2:52 left in the third quarter. Oceanside closed the quarter with a 6-0 run to take a 32-26 lead in the fourth. Waterville got no closer than four points the rest of the game. Hope Butler’s basket with 4:18 to play pushed Oceanside’s lead to 40-30, the largest of the game.

With Elise Laslavic in foul trouble early, Sara Dorr came off the bench and grabbed nine boards for the Mariners. Alexis Mazurek added eight points for Oceanside.

Playing her final high school game, Waterville’s 1,000-point scorer Jordan Jabar scored 19 points and had 12 rebounds. Maddy Martin added nine points for the Panthers.

“I like my group. They fight right to the end,” Rodrigue said.