DALLAS TWP. — For most of the 32 minutes of regulation, the Dallas Mountaineers were seemingly in control of a date with the district finals.

Right at the end, they lost it.

Madeleine Walsh tied the game with five seconds remaining in regulation Friday, then Madison Zalewski and Maggie Coleman each scored three points in overtime as Abington Heights rallied to down Dalla, 48-46 in a District 2 Class 5A girls basketball semifinal at Dallas High School.

“The girls played their hearts out,” Dallas coach Vince Bucciarelli said. “Everyone was picking them to beat us bad. I was proud of us for giving them such a good game.”

The games won’t stop yet for Dallas (19-7) as the Mountaineers will face Crestwood in a district third-place game Wednesday that will send the winner to the PIAA playoffs as the No. 3 seed. Meanwhile, Abington Heights (18-6) will battle the tournament’s top seed Scranton for the district crown.

For the longest time, it appeared Dallas was headed for a shot at that crown.

The Mountaineers staggered the taller Comets by spring-boarding to an 18-6 lead in the opening quarter when Mia DelGaudio hit a pair of 3-pointers and Elizabeth Viglone buried another.

Abington Heights made the first of a couple of runs at the Mountaineers in the second quarter when Emily McDonald drilled a couple of 3-pointers and the Comets defense held Dallas to two points — on a pair of free throws by Molly Walsh. But Dallas maintained a 20-13 halftime advantage and, after an eight-point third quarter by Walsh, took a four-point lead into the final period.

In a physical fourth quarter, Coleman took a step back with time winding down and nailed a 3-pointer with 32 seconds to play, drawing Abington Heights even for the first time since the game’s opening minute.

Molly Walsh responded with a hard-driving layup to give Dallas a 42-40 lead with 18 seconds to play in regulation.

But the celebration was brief for Dallas, as Madeline Walsh answered with a 12-footer for the Comets five seconds from the regulation horn to send the game to overtime.

Molly Walsh gave Dallas its last lead, 46-45, with a strong drive into the paint with 1:05 to play in overtime, but Coleman swished a soft shot eight seconds later as the Comets regained the lead.

Zalewski then hit a free throw for the final margin.

“We should have had them in regulation,” Bucciarelli said. “We got a little rattled, a little nervous. It’s going to take a little when you think about this, but we’ll get ready for Wednesday.

“We have to work hard to beat Crestwood.”

District 2 Class 5A semifinals

Abington Heights 48, Dallas 46

ABINGTON HEIGHTS (48) — Zalewski 6 1-2 14, K. Scoblick 0 0-0 0, Coleman 3 1-2 8, McDonald 6 4-6 18, Houlihan 1 2-6 4, Walsh 1 0-0 2, L. Scoblick 1 0-0 2. Totals 18 8-16 48.

DALLAS (46) — Mizzer 1 0-0 2, Casey 3 1-2 7, DelGaudio 2 0-0 6, Walsh 6 11-13 23, Viglone 2 3-6 8, Wydra 0 0-0 0, Comitz 0 0-0 0. Totals 14 15-21 46.

Abington Heights`6`13`8`15`6 — 48

Dallas`18`2`11`11`4 — 46

Three-point goals — AH 4 (McDonald 2, Zalewski, Coleman); DAL 3 (DelGaudio 2, Viglone)