WILLIAMSPORT, Md. — Mountain Ridge pulled to within 34-27 early in the fourth quarter, but two final big plays pushed Williamsport over the finish line.

A long return and a penalty gave the Wildcats a short field, and one play later, Masiah Martin sprung free for a 40-yard touchdown reception. On the Miners’ next series, Landen McAllister returned an interception 45 yards for six more to seal the result.

The Wildcats scored five touchdowns of 30 or more yards, talented receiver Ceonta Wilmore racked up 181 yards and three scores and Williamsport had two pick-sixes to topple No. 3 Mountain Ridge, 47-27, on Thursday night.

None of that seemed to matter at the end, however.

The game was called with 17 seconds remaining after Mountain Ridge’s Owen McGeady was the victim of a blindside hit. McGeady, who had two first-half interceptions, suffered a neck injury and left in an ambulance.

Mountain Ridge head coach Nathan Shipe said McGeady was able to move all of his limbs and had feeling, but he was taken to the hospital out of precaution.

“Our prayers are with Owen and a couple of players injured tonight,” Shipe said. “As far as football goes, we knew coming down here that we had to limit their explosive plays with their athletes. We weren’t able to do that. The scoreboard reflects that.”

The loss drops Mountain Ridge to 4-4 heading into its regular-season finale against Keyser. Williamsport improves to 5-3.

Mountain Ridge did well to defend the Wildcats other than its defense of Wilmore, who was able to break off receptions of 51, 43, 34 and 34 yards, often after contact.

Williamsport had just 76 yards of offense other than Wilmore.

“We knew once he was able to get going, feel good and get involved in the game, that that would be a problem for us,” Shipe said. “The goal was to try to change our coverages up to try to confuse the quarterback. ... We weren’t able to do that.”

Williamsport quarterback Gabriel Parker completed 11 of 15 passes for 215 yards, four touchdowns and one interception.

He threw touchdowns of 43, 34 and 14 yards to Wilmore and the 40-yarder to Martin. Martin also intercepted a pass 60 yards for a touchdown in the first half.

Mountain Ridge trailed 13-3 after the first quarter, 19-11 at the half and 34-19 after three periods.

Miners quarterback Carter Clites completed 17 of 28 passes for 172 yards, two touchdowns and two interceptions. He also ran for a 10-yard score in the fourth.

The Miners’ Eli Sibley caught seven passes for 81 yards, including a five-yard pass for a score in the second quarter. Cobe Penick hauled in five passes for 55 yards. Kyree Griffin caught a nine-yard touchdown in the third period, and he also rushed for 98 yards on 25 carries.

Penick entered at quarterback for the Miners’ final series after Clites was injured. Levi Clise also exited after sustaining an arm injury early in the game. Both of their statuses are unknown.

Tyler Cook made a 22-yard field goal for Mountain Ridge in the first quarter.

Mountain Ridge was 3 for 3 on two-point conversions. Sibley ran one in and Clites completed passes to Sibley and Penick.

Williamsport’s Tae-myj Boyce-Brown scored the game’s first points on a two-yard run. His touchdown was set up by a fumble recovery and return by Wilmore.

Mountain Ridge will play for a fourth straight winning season next Friday when it heads to Keyser (3-4) in a 7 p.m. kickoff.