BOISE, Idaho (AP)Puka Nacua caught 14 passes for 157 yards and two touchdowns, including an acrobatic catch for the go-ahead score with 1:46 remaining, Jaren Hall passed for 377 yards and BYU defeated Boise State 31-28 on Saturday night.

BYU (5-5) snapped a four-game losing streak in the final match-up of a 12-game series with neighboring Boise State. It was only the second time the Cougars won on the Broncos’ famed blue turf.

Boise State (6-3) saw its four-game winning streak snapped as the Broncos’ nationally second-ranked defense surrendered 532 yards, a season high.

Trailing 28-24 with 6:28 remaining, Hall cobbled together a nine-play, 75-yard drive that ended when Nacua made a juggling 6-yard touchdown reception on fourth down. He twisted in the air while securing control of the ball and then tapped his feet down.

BYU dominated the first half on the stat sheet, but not the scoreboard as the half finished with the score knotted at 7.

The Cougars passed up a chip-shot field goal on fourth-and-goal from the half-foot line with one second remaining in the half. But after four combined timeouts in a game of cat-and-mouse, Lopini Katoa’s dive off right tackle was stuffed by Boise State’s Ezekiel Noa at the goal line.

But that was a decision BYU coach Kalani Sitake won’t be scrutinized for too much after the Cougars escaped with a victory.

Boise State, which mustered only 76 yards of offense in the first half, found its rhythm in the second half and turned the game into a see-saw affair. There were six lead changes in the second half as neither defense had much of an answer for the offensive explosion.

THE TAKEAWAY

BYU: During the Cougars’ four-game losing streak, their defense struggled, giving up over 400 yards in every loss and over 500 yards twice. But the Cougars answered the bell, holding Boise State to under 400 yards, a feat they hadn’t accomplished since their last win, a 38-26 victory over Utah State.

Boise State: The Broncos fledgling hopes of playing in a New Year’s Six game vanished with the loss, but they remain in control of their fate in the Mountain West. If Boise State wins its final three conference games, it will host the Mountain West title game, a notion nearly unthinkable at the end of September after losing 27-10 to UTEP.

UP NEXT:

Boise State: The Broncos travel to Nevada on Saturday.

BYU: The Cougars have a bye week before hosting Utah Tech in the Cougars’ home finale.

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