PORTLAND — Cape Elizabeth played against possibly the best defense it’s seen all season, but the Capers were even better at that end of the court in Tuesday’s Class B South girls’ basketball quarterfinal.

Oak Hill held the seventh-seeded Capers to just four points in the first quarter, but the second-seeded Raiders was unable score more than seven in any period, and that wasn’t enough to overcome a couple Cape Elizabeth offensive spurts in a 34-26 Capers victory at the Portland Expo.

“Probably the best defense we’ve seen all year,” Capers coach Christine Casterella said. “Just ended up making enough shots and getting enough stops to win it at the end.”

The Raiders (16-3) stymied the Capers (9-10) at the start. Brooke Harvey gave Cape Elizabeth its first points less than three minutes into the game, and that pull-up jumper was the only Capers field goal of the opening quarter. But Oak Hill could only muster a Desiree Dumais layup and Audrey Bauer 3-pointer for a 5-4 lead.

“All those B South teams (out of the Western Maine Conference), they’re all highly athletic, they’re big, they’re strong. It’s always a challenge for us to try to find offense through that stuff,” Raiders coach Mike Labonte said.

Casterella had a hard time explaining her team’s offense in the game, but a 7-2 run after Dumais opened the second quarter with a three-point play gave the Capers their first lead at 11-10. Isabel Berman drained a 3 and Harvey had a three-point play of her own to tie the game at 10 apiece.

Karli Chapin’s free throw gave the Capers the lead, and that started a foul-shot contest to end the first half, the Capers making four and the Raiders two for a 15-12 Cape Elizabeth lead at halftime.

“(At halftime) we just kind of talked about that it was still early, we still had time,” Labonte said. “That we just had to tighten up on defense and make it harder for them. And to try to move the ball a little quicker so that we could create some space.”

Instead, it was the Capers who created some space between themselves and the Raiders, taking leads of 20-12 and 24-15 before Abby Nadeau finished the third quarter with four free throws to decrease Oak Hill’s deficit to five points.

Nadeau scored six of her eight points in the third, and her only field goal. The Capers otherwise made life difficult for the Oak Hill senior forward.

“Tried to stay between her and the basket, and just really help out when we could. But they have kids on the perimeter that can hit shots, so it was a lot of 1-on-1, and just trying to move our feet and just not let her get to the hoop,” Casterella said.

Dumais made the only basket of the fourth for the Raiders, who were held to just six field goals in the game. Dumais finished with a game-high 12 points.

Harvey and Berman both had a team-high nine points for the Capers, but it was free throws by Jessica Robicheaw, Saylor Wood and Chapin that allowed Cape Elizabeth to hold on for the upset (according to seeds).

“We made them when we needed to make them,” Casterella said. You’d like your team to be perfect, but we’ll take it. It was good enough.”

The Capers next face No. 3 Freeport in the semifinals, while Oak Hill’s season comes to a halt.

“We thought we really had a good chance to compete today, and I thought we could pull it out,” Labonte said. “But kudos to Cape.”