CAPE ELIZABETH — Cape Elizabeth Coach Ben Raymond didn’t expect his boys’ lacrosse team to win Tuesday night’s game against Greely in the third quarter.

He just didn’t want the Capers to lose it in the third as they had in previous games.

After squandering halftime leads against Yarmouth and Thornton Academy for one-goal losses, Cape Elizabeth (3-3) got the job done against the Rangers (3-2), outscoring them 7-3 in the second half en route to a 9-6 victory.

“That was one of the focuses today – just being better in the third quarter,” Raymond said. “In the second half, we moved the ball really, and our defense slid really well … It’s nice to come out on top in a close game.”

Ben Carroll led the Capers with three goals and Finn Raymond and Jacob Brydson both contributed two. Jack Dresser finished with 10 saves – five in the first quarter.

With Jackson Williams taking the draws, Greely won 14 of 19 faceoffs. Ben Kennedy and Andrew Lawrence scored two goals apiece for the Rangers, who had a 3-2 halftime lead after two conservative defensive quarters.

“Cape Elizabeth has a lot more experience than us in these tight games,” said Greely Coach Mike Storey, whose team is off to a strong start after missing the playoffs the past two seasons. “We came out here and competed with a really high-quality program, and this was a great opportunity for us to learn and build.”

After Dresser stopped back-to-back Greely shots late in the first quarter, Finn Raymond opened the scoring with a goal in transition for the Capers. Jackson Williams tied the score 15 seconds later off the ensuing faceoff before William Schumacher added a goal from Schuyler Wetmore to pull the Rangers up 2-1.

Finn Raymond and Lawrence exchanged goals in the second quarter, and Cape Elizabeth outscored Greely 3-2 in the third to tie the score 5-5.

“I think, sometimes, we come out here expecting to just roll over a team,” Finn Raymond said. “But we have to come out hot. We’ve been working on that – especially in that second half.”

Williams won the opening faceoff of the second half but bounced his shot over Cape Elizabeth’s crossbar. Carroll and Brydson then scored to give the Capers a 4-3 lead with 7:15 left in the third before Kennedy tied the score 28 seconds later.

After Phillip Tarling pulled Cape Elizabeth up 5-4 with 5:45 left in the third, Greely goalkeeper Sawyer Gagnon (seven saves) kept the Capers from cushioning that lead when he stopped Finn Raymond from close range.

Lawrence then answered for Greely with a goal from Wetmore for the final goal of the third.

After Sam Dresser scored for Cape Elizabeth with 11:47 left, Kennedy answered 21 seconds later for Greely’s final goal, which tied the score one last time. Cape Elizabeth then went on a run, with Brydson scoring once and Carroll adding a pair of goals for a hat trick.

“All season, the third quarter has been our toughest quarter,” Carroll said. “Coach has been stressing that we have to be better at getting ground balls and possessing.”

CORRECTION: This story was updated on May 10 at 10:30 a.m. to correct the name of Greely goalkeeper Sawyer Gagnon.