CUMBERLAND — Patric Murphy scored a sensational goal 28 seconds into overtime Wednesday to lift fifth-seeded Kennebunk to a 9-8 victory against fourth-ranked Greely in a Western Class B boys’ lacrosse quarterfinal at Hutchins Field.

Murphy picked up a loose ball in front of the Greely goal and while standing just outside the crease, flipped the ball over his left shoulder for the winner.

“I caught the ball and I just thought, ‘shoot it,’ ” Murphy said. “It was overtime and the first goal wins it.”

“He’s crafty and he’s a good player,” Coach Dan Seavey said. “He was in the right place at the right time and he wanted that goal.”

The Rams (7-6) will play at top-ranked Cape Elizabeth (10-2) in a semifinal Saturday.

Greely, which defeated Kennebunk twice in the regular season, took a 5-1 lead in the first 12 minutes.

“You never like to see a team for a third time,” Greely Coach Mike Storey said. “It’s a tough matchup.”

The Rangers (8-5) won 13-9 at Kennebunk on May 12 and 13-8 last week at Cumberland.

“They work from beginning to end,” Storey said. “They don’t ever give up on the game, and they keep grinding and keep grinding.”

Donovan Connor scored the early goal that kept Kennebunk in the game.

“Lacrosse is a game of momentum and they built it,” Storey said. “All the credit to (Kennebunk). They worked hard and I feel they outworked us today. They truly deserved that win.”

Patrick Gassman provided one key to victory, winning 15 of 20 faceoffs.

“He’s a great faceoff guy and we knew that going in,” Storey said. “We were planning on him winning the majority (of the faceoffs) so we lined up our (long) poles to meet him.”

Between them, the teams committed 65 turnovers. As a result, neither team could sustain momentum.

“We didn’t take care of the ball,” Storey said. “We started throwing the ball away. We didn’t possess the way we should and we let them start outworking us.”

Connor and Jack Boothby each scored three goals for the Rams. Gassman and Boden Beveridge each had a goal and an assist. Kyle Mooney also contributed an assist.

Mitchel Mullin scored two goals for the Rangers. Sam Peck, Gabe Belisle and Dillon Trelegan each scored a goal and had an assist. Chris Borden and Tim Adams each scored a goal.

Boothby and Connor scored in the last 21/2 minutes of regulation to make it 8-8 and force overtime.

“We had some ups and downs,” Seavey said. “Fortunately we came on strong in the second half. We made a few adjustments and we had an awesome finish at the end.”