SAN LUIS OBISPO, Calif. (AP)  Dano Graves connected with Kyle Lewis on a 39-yard touchdown with 4:39 to play and Cal Poly spoiled a record-breaking day for Montana with a 42-41 win on Saturday.

Graves drove the Mustangs (3-1) 75 yards in eight plays and then weathered a Montana drive that ended when Tim Semenza missed a 48-yard field goal in the Big Sky Conference opener for both teams.

Montana quarterback Brady Gustafson completed a school record 47 passes in 59 attempts for 418 yards. Both of his touchdowns went to Jerry Louie-McGee, who had a school record 21 catches for 155 yards.

Montana (2-1) led 17-7 and Gustafson had completed all 15 of his passes, eight to Louie-McGee for 120 yards that included a 61-yard score. After a Cal Poly scoring drive, Gustafson completed another pass before his 17th attempt was tipped and intercepted by Aaryn Bouzos. The Mustangs turned that into Lewis” 13-yard scoring run on the next play and then Gustafson fumbled on a sack, which led to a 16-yard TD pass from Graves to Kory Fox and a 28-17 lead.

Gustafson hit Louie-McGee for another score 30 seconds before halftime to make it 28-24.

Jeremy Calhoun”s third TD run put Montana up 38-35 early in the fourth quarter.