Even though the Thornton Academy girls’ basketball team was struggling and down midway through the third quarter, the Trojans weren’t worried.

“I know what we’re capable of doing,” said senior guard Katie McCrum.

Especially defensively, where Thornton Academy led the SMAA in scoring average (27.6) this winter. And defense is what enabled the second-ranked Trojans to rally past seventh-ranked Scarborough 43-27 on Monday in a Western Class A quarterfinal at the Portland Expo.

Thornton Academy held the Red Storm to just one basket over the final 11 minutes and 45 seconds, closing the game on a 21-2 run.

“We tightened some things up a little in the second half,” said Thornton Coach Eric Marston. “I’m proud of our girls and the effort they showed defensively, which got us going offensively. That’s sort of been our signature all year, turning defense into offense.”

Thornton Academy (17-2) will play third-ranked Gorham (17-2) in the regional semifinals at 7 p.m. Wednesday at the Cross Insurance Arena.

It’s the first time since 1985 that the Trojans have advanced past the quarterfinals.

Scarborough (10-10) had taken control late in the second quarter as six consecutive points by Ashley Briggs gave the Red Storm an 18-17 halftime lead. And with 3:45 remaining in the third, freshman Sophie Glidden finished off a fast break to make it 25-22.

That’s when the Trojans took control. A steal by McCrum led to a fast-break basket by Alex Hart. Scarborough would miss five shots and turn the ball over twice more in the quarter.

“Coach just doesn’t want to make anything easy for our opponents,” said McCrum.

Hart’s foul-line jumper gave the Trojans a 26-25 lead.

Then Ashley Howe scored on a three-point play. Howe closed out the run with a 3-pointer with 3.7 seconds left in the third for a 32-25 lead.

“And those seven points felt like 20,” said Scarborough Coach Mike Giordano. “Because they are so darn good defensively.”

Howe (11 points) said it was simply her time to contribute. She had not scored in the first half and said, “I knew I had to step up in order to help my team come out with a win.”

Scarborough scored only two points in the fourth, a basket by Briggs with 6:28 remaining

“We just buckled down,” said Howe. “We’ve never been to the (semifinals) and every one of us wanted it for each other.”