CAPE ELIZABETH — The formula for the Cape Elizabeth High boys’ soccer victory Thursday night was simple.

Twice as many corner kicks meant twice as many goals, as the third-seeded Capers topped sixth-seeded Greely 2-1 in a rain-soaked Class B South quarterfinal at Hannaford Field.

The Capers scored the winner with 3:31 left when John O’Connor sent a corner kick into a scrum in front. The ball went off teammate Alec Riggle for a 2-1 lead.

O’Connor gave Cape Elizabeth (10-4-1) a 1-0 halftime lead when he faded a perfect corner kick into the net. Greely (9-6-1) answered with 26:48 left in the game when Evan Goettel headed in a corner from Silas Cunningham.

Cape had 10 corner kicks in all, five more than Greely.

“We told our players that corner kicks would be the key,” Greely Coach Mike Andreasen said. “You’ve just got to make plays and Cape made one more than we did.”

Cape Elizabeth will be at second-seeded York (13-2) in the semifinals Saturday. The Wildcats topped Cape 2-1 last month.

Cape played Greely twice during the season, a 2-1 win and a 0-0 tie.

“We’re pretty evenly matched,” Andreasen said. But he watched his Rangers be outplayed in the first half.

After O’Connor’s score only 6½ minutes into the game, the Capers kept attacking. O’Connor and fellow midfielders Oliver Moon, Nick Aceto and Sam Dresser pushed the ball upfield. Riggle and Matt Concannon created chances up front.

“We were on our heels,” Andreasen said. “To be honest, we were kind of happy to be down 1-0. It could have been worse.”

When Greely did attack, it usually came from midfielders Quinn Molloy or Matt Kramlich. The Rangers wanted to get the ball to forward Hazael Tshituka, but he was well covered.

“Nick Clifford did a great job marking Hazael,” said Capers Coach Ben Raymond, who lauded credit on his other defenders, David Hare, Ben Carroll and Charlie Dall.

In the second half, Greely put an extra man on the attack, which helped.

“We had the momentum going,” Andreasen said.

Both teams created opportunities as they tried to keep their footing on the soaked turf.

“It’s awfully tough to play in the wet conditions, for both teams,” Raymond said. “The ball is skipping all over the place. The second half turned into a back-and-forth. Both teams had good chances.”

Greely goalie A.J. Eisenhart made four saves in the second half. Sean Agrodnia had three saves for Cape.

Greely had a prime chance after a foul with six minutes left. Chris Theodores blasted a shot from 20 yards, but Agrodnia dove and slapped it away.

Cape kept getting corner kicks, playing into its strength.

“We’re dangerous on corner kicks because (O’Connor) is able to put it where he needs to,” Raymond said.

“It’s the advantage we have because our kids know where it’s going.”

O’Connor’s corner for the winner went toward the near post, where a crowd of players went for it.

Kevin Thomas can be reached at 791-6411 or:

[email protected]

Twitter: KevinThomasPPH