AUGUSTA — Fifth-seeded Oceanside rode record-setting 3-point shooting to a 59-45 win against No. 3 Medomak Valley as it captured the Class A North boys’ basketball championship Friday afternoon at the Augusta Civic Center.

The Mariners put in eight shots from behind the arc, bringing their three-game tournament total to 29. That broke the Class A North (formerly Eastern Class A) record of 24 set by Bangor in 1997.

“That’s what we do,” Oceanside Coach Matt Breen said. “That’s the style we play. We’re strong on the perimeter with good shooters, and you have to take advantage of that.”

Six players sank at least one 3-pointer for the Mariners, who will play the winner of Saturday night’s Class A South regional final between Brunswick and Falmouth for the state title next at the Cross Insurance Arena in Portland next Saturday afternoon.

It is the first regional basketball championship for Oceanside (16-5), which opened in 2011 following the consolidation of Georges Valley and Rockland.

“It’s great for the community,” Breen said. “We’ve had some really talented teams in the past five or six years and we just haven’t been able to get over the hump. Those kids worked and worked, and these kids worked hard and they finally were able to do it.”

Keenan Kendricks, who received the Al Halliday Award as the tournament’s outstanding player, scored 15 points for the Mariners. He hit two 3s and guarded Nicholas DePatsy, the Panthers’ top player, for most of the game.

The Mariners took a 24-21 lead when Cooper Wirkala, a 6-foot-3 freshman center, sank a 3-pointer from five feet beyond the arc just before the halftime buzzer.

Both teams played intense man-to-man defense during the first 16 minutes, making it difficult for either team to run its offense efficiently.

Oceanside moved ahead 21-16 when Nate Raye and Hendricks nailed back-to-back 3-pointers. The Panthers cut their deficit to a point on inside hoops by Cameron Allaire and DePatsy.

Medomak Valley (17-4) had a difficult time defending Oceanside’s 3-point shooters.

“If you sag off them, another (player) hits a shot,” Medomak Valley Coach Nick DePatsy said. “They’re playing really well, right now. They’re moving the ball well, playing better defense.

“Our closeouts were good in the first half, and in the second half, not so good. They got into transition and got some 3s. That kind of hurt us.”

The Mariners broke the game open with a 12-0 run for a 41-28 lead with 1:25 left in the third quarter. Raye, who scored 13 points, hit back-to-back 3-pointers in the fourth quarter to increase the lead to 14 with four minutes left.

Nick Mazurek added 10 points.

DePatsy scored 14 points for the Panthers.

The Kennebec Valley Athletic Conference rivals split their two regular-season games. The Mariners eked out a 62-57 win on Dec. 15 on their home court in Rockland. Medomak rolled to a 68-48 win on Jan. 22.

The teams hadn’t met in tournament play since 2012, when Medomak Valley won 55-39 in an Eastern Class B quarterfinal.