FALMOUTH — It always comes down to defense for the Windham High girls’ basketball team. At least that’s what Brody Artes preaches to his players.

So it shouldn’t have been a surprise when, with Windham down by seven late in the fourth quarter of its Western Class A tournament prelim with Falmouth that he said, “Defense is going to get us back into this game. Defense is going to win it.”

And it did. The 11th-seeded Eagles closed with a 14-2 run, and didn’t allow any points in overtime, to upset sixth-ranked Falmouth, 51-46.

Windham (9-10) will play third-ranked Gorham (16-2) in the quarterfinals at 2 p.m. Monday at the Portland Expo.

“It’s just a testament to the character of the girls,” said Artes. “When push comes to shove, we play great defense.”

Sadie Nelson scored 21 points for the Eagles, hitting four 3-pointers. Mya Mannette had 16, also hitting four 3s.

Falmouth (12-7), behind the standout play of Ally Hickey and Jess Burton (team-high 17 points), had put together a 9-0 run to take a 44-37 lead with 3:34 remaining but couldn’t hold it.

Falmouth pulled the ball out to slow the game but a turnover allowed Windham to set up Nelson, who hit a 3-pointer from outside the key to make it 44-40. Another turnover led to a basket by Luisa Sbardella to make it a two-point game.

Both teams missed shots on their next possessions, then Windham forced a five-second closely guarded turnover to get the ball with 42 seconds remaining.

“We had success with it before,” said Falmouth Coach Mari Warner. “Up seven with three minutes left, you want to take time off the clock. But we had a couple of turnovers that were critical and not traditional for us.”

Mannette drove right and tied it with 34 seconds left. Falmouth responded when Hickey (11 points, eight rebounds, four assists, four blocks) lobbed a perfect pass to Burton, who had two defenders on her but somehow squeezed in a layup for a 46-44 lead with 11.2 seconds left.

Windham called a timeout and Falmouth attempted to commit a quick foul when play resumed. It couldn’t and the players, said Warner, “were out of position” for what happened next.

Sbardella missed a running 3 but followed the shot for the rebound. There she was met by Burton but passed to find Nelson open on the left. Her shot went in at the buzzer to send the game into overtime.

“I was worried the clock was going to run out,” said Sbardella. “It was the best feeling in the world when Sadie scored.”

Windham controlled the overtime defensively, forcing two turnovers and holding Falmouth without a point. Nelson put the Eagles in the lead with a 3-pointer from the right wing and Ciera Berthiaume sealed it with a layup with 32 seconds left.

“I was nervous when we were down,” said Nelson, who also had nine rebounds and three assists, “but I didn’t want the season to end.”

Windham, which rose from the seventh seed to the regional final last year, looks to be hot again.

“It feels like anything can happen,” said Nelson. “We showed that tonight.”