BOISE, Idaho (AP) When BYU lined up to attempt a game-winning field goal with 16 seconds remaining, Boise State nose tackle David Moa was struggling to get his shoe on along the sideline as head coach Bryan Harsin was pleading for someone to help Moa.
''That might have been the most stressful moment in the whole game,'' Harsin said. ''BYU is lining up for a field goal and I can't get my nose tackle out there.''
Moa managed to get his shoe on in time before he blocked the Cougars' 44-yard field goal attempt and help Boise State escape with a 28-27 victory Thursday night in a wild finish.
The Broncos (7-0), who won their 23rd straight non-conference home game, overcame five turnovers in the victory. Since 2004, FBS teams that are minus-5 in the turnover category are 9-231.
''I think it shows the will of this team,'' Boise State linebacker Tanner Vallejo said. ''We scratched and clawed and were able to get the win. This is a confidence booster for this team.''
BYU (4-4) still had another chance to win the game after Rhett Almond's field goal attempt was blocked. The ball didn't cross the line of scrimmage and Mitch Juergens recovered for BYU, giving the Cougars the ball at the Boise State 42 with 8 seconds left.
The Cougars, who beat Boise State on a last-minute Hail Mary play last season, couldn't duplicate the magic on the final play of the game as the ball was knocked down in the end zone.
It was another narrow defeat for BYU, which has lost all four games by a combined eight points.
''We had five turnovers and we were able to take care of the football, which is what kept us in the game,'' BYU coach Kalani Sitake said. ''When you're ahead 5-0 in the turnover battle, you shouldn't even be in the game. That says a lot about how good this Boise State team is.''
Taysom Hill was 21-of-42 passing for 187 yards for BYU, while Squally Canada rushed for 88 yards.
BYU, which was without leading rusher Jamaal Williams due to an ankle injury suffered in practice this week, mustered just 322 yards of offense, well below its 405 yards per game average.
However, it was still almost enough for the upset-minded Cougars.
BYU took a 27-21 lead with 13:33 remaining on a 37-yard field goal by Almond.
Then Boise State's offense came to life for the first time in the second half.
Rypien engineered a 10-play, 90-yard drive that ended in a 4-yard touchdown run by Jeremy McNichols with 10:37 remaining. Tyler Rausa's extra point gave the Broncos a 28-27 lead that withstood BYU's last-minute rally.
Rypien threw for 442 yards and three touchdowns with two interceptions.
McNichols rushed for 140 yards and had 109 yards receiving along with a pair of touchdowns. Thomas Sperbeck also had 109 yards receiving on nine catches, his 11th career game with more than 100 yards receiving.
BYU: The Cougars have a chance to finish the season strong against a softer schedule that doesn't include any Power 5 schools.
Boise State: The Broncos remain in position to secure a New Year's Six bowl berth if it continues winning and Houston stumbles.
This game was likely Boise State's last chance to impress Top 25 poll voters in the regular season with a win over a quality opponent. However, the Broncos won't likely move up much in the next poll since the teams directly in front of them are either idle or play weaker opponents.
BYU: The Cougars take a week off before returning to the road for a game at Cincinnati on Nov. 5.
Boise State: The Broncos will take advantage of the extra couple days to prepare for a road tilt with divisional foe Wyoming next Saturday.
Boise State senior Thomas Sperbeck celebrated his birthday in style by catching a 20-yard pass in the first quarter to become the school's career leader in receiving yards. He surpassed former Detroit Lion receiver Titus Young, who held the previous school record with 3,030 yards. Sperbeck needs 53 receptions to catch all-time leader Matt Miller.