PORTLAND — Senior Lydia Stegemann scored a game-high 20 points with 12 rebounds and came up big at two key junctures in Waynflete’s 43-37 schoolgirl basketball victory over Cape Elizabeth on Monday.

After sparking a 9-2 third-quarter run that turned the game in the Flyers’ favor, Stegemann hit the go-ahead basket with two minutes left in the fourth as Waynflete pulled away late.

That third-period spurt gave the Flyers (14-3) their first lead since 3-0, and it was 29-24 entering the final quarter.

But Kayla Raftice scored off the dribble to open the fourth for Cape (8-9), and after Martha Veroneau took a steal all the way for a Waynflete bucket, Raftice hit a 3, then converted a full-court pass from Emily Donovan to tie it at 31 with 5:56 left.

Liz Lewis followed a Flyer timeout with a free throw, and a Stegemann 3-pointer put Waynflete up by four, but three Raftice foul shots to one by Lewis put Waynflete ahead by two, 36-34.

Donovan took a pass from Emma O’Rourke on the left and hit a 3-pointer, and Cape was back on top one more time with 2:10 to play.

But Stegemann drove through the Capers’ zone defense in the paint and put in a left-handed scoop shot that gave Waynflete a 38-37 lead, and the Flyers held on with a pair of clutch free throws from Rhiannan Jackson, one from Veroneau, and two more from Stegemann.

“(Cape’s) a good team,” Waynflete Coach Brandon Salway said, “and they made us work for everything we got. This game was worth some Heal points. (The Flyers are currently third in Western Class C, and Cape is seventh in Western B), but more importantly, it gives us some confidence.”

Both teams struggled on offense against zone defenses in the first half, as the two squads each shot 5 for 20 from the floor and Cape led 15-14 at the break.

Kisa Tabery’s put-back gave the Capers their largest lead at 21-17 in the third, but Samantha Oakland banked in a 3 to pull the Flyers to within a point before a Donovan free throw made it 22-20.

That’s when Stegemann took over the game, first converting a smart baseline pass from Leigh Fernandez to tie it and then hitting a free throw off an offensive rebound for the lead.

That was the first of six offensive boards (four by Stegemann) in the next two minutes for the Flyers, who had been largely kept off the glass in the first half.

“We talked about that at halftime,” said Salway. “We had four offensive rebounds in the first half, and that’s unacceptable. We had been settling for quick shots, and we needed to be patient and attack the glass to get second and third chances and to get to the line, which ultimately was what won the game.”