BOZEMAN, Mont. (AP)Tommy Mellot ran for 273 yard s and three touchdowns, passed for another score and Montana State held off Weber State 43-38 in a battle of top five FCS team on Saturday.

The Bobcats (7-2, 5-0 Big Sky Conference), ranked second in the coaches poll, reeled off 34 straight points but didn’t secure the win over the fifth-ranked Wildcats (6-1, 3-1) until a fourth-down pass was dropped inside the MSU 15 with 25 seconds to play.

The ultimate difference for Montana State, which set a program record with its 17th-straight home win, was an FCS record four safeties, all coming on snaps to the punter on the cold, wet and windy day. The Wildcats had an eight-game road winning streak end.

Weber State took a 24-9 lead thanks to a 100-yard kickoff return by Abraham Williams and a 91-yard punt return by Hudson Schenk.

Mellott’s second TD run, his 15-yard pass to Derryk Snell and the second and third safeties had the Bobcats on top 27-24 at halftime.

The fourth safety, Mellott’s third TD run and R.J. Fitzgerald’s 1-yard plunge, extended the lead to 43-24 late in the third quarter.

Weber State put together back-to-back long drives to regain the momentum. Ty MacPherson hauled in a 21-yard pass from Bronson Barron and after the Bobcats failed on a fourth-down conversion at the Wildcats’ 14 early in the fourth, Barron scored on a 1-yard plunge.

Pinned on their 10 after a punt with 2:07 to play, Barron converted twice on fourth-and-10 and hit an open MacPherson on fourth-and-10 from the 27 but the ball slipped through MacPherson’s hands.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/AP-Top25. Sign up for the AP’s college football newsletter: https://apnews.com/cfbtop25