With second-seeded Cape Elizabeth leading seventh-ranked Greely by 15 points with just under six minutes remaining Saturday, Cape Coach Jim Ray yelled to his team, “We have enough points already. We don’t have to shoot if it’s contested.”

Cape had done the necessary work with its fast break and defense to get into position to advance with an impressive 68-51 victory in the Western Class B boys’ basketball quarterfinals at the Portland Expo.

Cape Elizabeth (16-3) will play sixth-seeded Lincoln Academy (13-6) in the semifinals at 7 p.m. Thursday at the Cross Insurance Arena in Portland.

Eddie Galvin and Jack O’Rourke each scored 15 points for Cape, which broke open a tight game in the second quarter. Galvin, slashing to the basket, scored 13 in the first half, nine in the second quarter. O’Rourke had eight points in the opening quarter, including two straight 3-pointers.

Cape led 19-16 after a wide open first quarter, then went on a 15-4 run sparked by Galvin, who had seven points. The Capers were getting up and down the floor, and finding openings on drives.

“We stuck to our game plan and just ran our offense,” said O’Rourke. “The second quarter was a big factor in the game.”

Greely jumped to a 5-0 lead but Cape scored the next nine points: Galvin scored inside, Ethan Murphy hit a 3-pointer from the corner to tie it, Galvin followed with two free throws, then a basket before Ryan Twitchell answered for the Rangers. Calvin Soule hit a 3-pointer from the corner to give Greely back the lead. It was the last time it led.

O’Rourke followed with his back-to-back 3s and almost had three straight but the ball rimmed out.

“That’s my game,” said O’Rourke of his 3-point shooting. “We’re best when we’re forcing the pace.”

Late in the game, Ray wanted his team to be more selective in their shots. After his admonishment, the Capers ran time off the clock.

James Bottomley and O’Rourke then followed with uncontested layups to make it 62-42.

“Why force a shot if you don’t need it?” said Ray.

Ray said it’s a message he’s been stressing all season. “I think they’ve gotten the message,” he said.

Ray was pleased with the overall play of his team.

“I liked how all five guys played together. That was the key,” he said.

Of Galvin’s play, Ray called it “the Galvin factor.”

“He’s a tough matchup because his first step is so quick,” said Ray.

Cape’s depth, a factor all season, was evident. Players like Bottomley, Finn Bowe and Marcus Donnelly came off the bench to contribute points. Bottomley scored seven points, all in the second half. His first basket was a 3-pointer from the corner, which brought a smile from Ray after the game.

“James was struggling with his shooting during the season. The lid seemed to be on the basket for him,” said Ray. “During the regular season against Greely, he took a 3, it took a bounce straight up, his shoulders slumped, but it bounced through and the lid on the basket was lifted. He’s been fine since. He made some nice moves around the basket.”

Bowe, a freshman and the third brother to play for Cape, added five points, all in the second quarter. Donnelly chipped in with four. For Cape, it’s strength in numbers.

“Cape plays tough,” said Greely Coach Travis Seaver. “We had to shoot well to have a chance. We also made 23 turnovers and you can’t win doing that.”

Matt McDevitt led the Rangers with 20 points.