Cape Elizabeth overcame a challenge from Yarmouth to claim its third straight Class B boys’ lacrosse state championship Saturday, pulling away to a 7-5 victory at Fitzpatrick Stadium.

Cape Elizabeth (13-2) beat the Clippers twice in the regular season, but the state final wasn’t decided until Owen Thoreck scored his second goal of the game with 15 seconds remaining.

“This game came down to possessions,” Yarmouth Coach David Pearl said. “When you have as many penalties as we did and they have that many more chances to score, a team like Cape Elizabeth is going to score.”

The Capers, who have won four state championships in six seasons, pulled into a 4-4 tie less than two minutes into the second half when Rob Sarka scored on a man-up situation.

Cape Elizabeth limited the Clippers to two shots in the first 12 minutes of the second half.

The Capers moved into a 6-4 lead when James Bottomley and Ben Shea scored six minutes apart less than 10 minutes into the second half.

“I don’t know how much of an adjustment we made,” Cape Elizabeth Coach Ben Raymond said. “We just started executing better what we were trying to do in the first half.”

While the offense was trying to get untracked, the Cape defense limited the Clippers to one shot in the first 10 minutes of the second half.

“Our defense played outstanding, especially in the second half,” Raymond said.

“The first half I think it played (just) as well. We just didn’t pick up as many ground balls. In the second half we got to a lot more ground balls.”

After Cape took the lead, it appeared to become more deliberate with the ball.

“We didn’t want (Yarmouth’s) offense with the ball and we wanted to give our defense a break,” said Griffin Thoreck, who had a goal and three assists. “By us possessing it, we were able to do those two things. We controlled the game from there.”

Matthew Beatty of Yarmouth made it 6-5 when he scored his third goal of the game with less than four minutes remaining.

Yarmouth (12-4) led 4-3 at halftime after building a 3-1 advantage in the first 15 minutes.

“What we were trying to do was be aggressive and try to be smart about it, all at the same time,” said Henry Oliva, who picked up a rare assist as a defender when he set up his twin brother Joe’s goal to make it 2-0 less than four minutes into the game.

“What we focused on this week in practice was specific matchups.”

“They had some (defensive) slides coming from awkward angles that we had to adjust to,” Griffin Thoreck said. “It took a little bit longer for us to adjust, but once we figured it out our offense can do spectacular things.”

Brothers Griffin and Owen Thoreck scored less than five minutes apart to tie the game with two minutes remaining in the half.

Beatty put the Clippers back on top when he converted Tom Pietropaoli’s pass with 45 seconds left.

Riley Pillsbury also scored for the Capers, who have won 10 state titles since the Maine Principals’ Association began holding a boys’ lacrosse state tournament in 1998.

Bill Jacobs scored two first-half goals for Yarmouth, which made its third consecutive appearance in the state final.