OAKLAND — In the highly competitive Pine Tree Conference Class B, no lead is safe. When you get it, hold it tightly, as Brewer showed Friday night.

Brewer turned away Messalonskee twice in the final 1:32 when the Eagles had the chance to take the lead, holding on for a 29-28 quarterfinal win.

No. 5 Brewer (5-4) plays at No. 1 Skowhegan in the semifinals Friday. No. 4 Messalonskee ends the season 4-5.

With 1:32 to play, Messalonskee pulled within a point of the Witches when Austin Pelletier scored on a 1-yard run. The Eagles went for two and the lead, but quarterback Deklan Thurston was stopped short.

After Brewer recovered the onside kick at its own 47, the Witches went three and out, and with the Eagles using all three timeouts, punted the ball back to Messalonskee.

The Eagles took over on their own 28. A 23-yard screen pass from Thurston to Pelletier got the Eagles to the Brewer 34, but the drive stalled at the 33. With 16 seconds left, Messalonskee’s Kyle Burger-Roy tried a 50-yard field goal. The kick was on line, but 5 yards short, giving the Witches the win.

Brewer took the lead for good in Jacob McCluskey’s 14-yard touchdown run with 7:19 to go. McCluskey also had four catches for 94 yards.

Brewer was successful through the air. Cody Wood threw for 263 yards, and his 85-yard touchdown pass to Andrew Kiley (seven catches for 139 yards) gave the Witches a 21-16 lead with 4:49 left in the third quarter.

The Eagles answered with a 12-play, 84-yard scoring drive, which ended when Thurston went 14 yards scored on a bootleg to the left that gave the Eagles 22-21 lead with 11:01 left.

Messalonskee struck early in the game, scoring on a 65-yard touchdown pass from Thurston to Tyler Lewis on the first offensive play of the game. Lewis broke two tackles on the run and catch, but was injured in the second quarter and did not return.

After forcing a Brewer three and out, Messalonskee pushed its lead to 10-0 when Burger-Roy made a 31-yard field goal.

Messalonskee’s Pelletier returned after suffering a knee injury in the second quarter of last week’s regular season finale at Lawrence, and looked no worse for wear. Pelletier broke a 22-yard touchdown run with 3:41 left in the second quarter to increase the Eagles lead to 16-7.

While he didn’t have his usual workload, Pelletier ran hard, gaining a game-high 161 yards on 20 carries.

Brewer answered with an efficient five play, 56-yard scoring drive, capped by Bryant Kiley’s 18-yard touchdown run. Jacob McCluskey ran in the 2-point conversion, and the Witches trailed 16-15 at the half.

Bryant Kiley gained 107 yards on 15 carries for Brewer.