His team down a point with 30 seconds to play, Cape Elizabeth senior Amaniel Hagos snared a long offensive rebound and knew what to do: Look for 6-foot-9 teammate Andrew Hartel.

“I knew he would be open, so I just had to get it to 6-9, and 6-9 did his thing and we won,” Hagos said.

Hartel converted at the hoop, and that basket proved to be enough for No. 3 Cape Elizabeth to earn the Class B South boys’ basketball title with a 39-38 win Saturday at Cross Insurance Arena against No. 8 Wells, ending the Warriors’ bid for a third straight regional crown.

After Hartel’s basket, Wells used two timeouts to try to set up a final shot. Following the second timeout, Matt Sherburne had to track down a pass well into the backcourt, then hurriedly brought the ball up court and was fouled in traffic well away from the hoop with 1.7 seconds to play.

In a one-and-one situation, Sherburne missed the first free throw. Cape grabbed the rebound and secured its first regional title since 2015, when it went on to win the state championship.

Cape got possession for its winning shot when sophomore guard Nathan Mullen tipped a Wells inbounds pass near midcourt, then jumped on the loose ball and called a timeout with 55 seconds to play.

“I should have called timeout,” said Wells Coach Troy Brown. “I could feel it wasn’t right.”

“Our back was against the wall, and the kids are able to raise their intensity in situations like that,” said Cape Coach Jim Ray.

Cape Elizabeth (14-7) will face North champion Caribou at 2:45 p.m. next Saturday at Cross Insurance Arena. Caribou (18-3) earned its long trip to Portland by knocking off unbeaten defending state champion Hermon, 43-40.

It was a painful ending for Wells (11-11), especially seniors Sherburne, Tyler Bridge and Dylan Whitney. Each had been part of two regional championship teams. Wells had a six-point lead in the third quarter and led by three with 2:15 to play after sophomore reserve Caleb Corey (team-high 13 points) made his fourth 3-pointer.

Outside a teary locker room, Brown emphasized not the loss, but his team’s run of success.

“You know how many kid are out there that have never played in this basketball game? How many coaches that have never coached in this game?” Brown said. “Those three seniors, they want to make a name for themselves, and they’ve been a part of three of these games.”

Bridge did a good job contesting Hartel, forcing him just enough off his favored spots. Hartel (15 points) shot 7 of 19 but kept attacking, and Cape kept getting him the ball.

“My confidence was too high to let not finishing get to my head, so I just kept going at it,” said Hartel, who earned the Pierre Harnois Award as the top player of the regional.

Mullen added nine points, including a pull-up jumper that tied the game at 35-35 in the fourth quarter. He also did a good job keeping Sherburne (10 points) from driving to the basket.

“You look at the game, every basket was huge,” Ray said.

Hagos contributed six points to go with the rebound of his life. When Cape started the season 2-5, Hagos was out because of a concussion.

“He’s a huge help,” Hartel said. “He’s a big-time player and he made a big-time play.”

Steve Craig can be reached at 791-6413 or:

[email protected]

Twitter: SteveCCraig