BOISE — Brett Rypien threw for 269 yards and Alexander Mattison rushed for 143 yards and a pair of touchdowns to lead Boise State to a 24-17 upset over No. 16 Fresno State on Friday night.

Boise State (8-2, 5-1 Mountain West), which hasn’t lost to Fresno State at home since 1984, beat a ranked team for the first time in November in program history to keep its conference title aspirations alive.

Fresno State (8-2, 5-1) entered the game as the nation’s No. 2 scoring defense and had only given up three touchdowns in conference play before facing the Broncos.

GAME TRACKER: Boise State vs. Fresno State

Rypien, who became the Mountain West’s all-time passing leader in both yards and receptions, hit Khalil Shakir in stride on a 49-yard scoring strike with 9:22 remaining in the fourth quarter to give the Broncos a 24-17 lead.

The Broncos held Fresno State on its final two drives before running out the clock to secure the victory.

Leading 10-3 at halftime, Fresno State appeared to take control of the game by driving 75 yards on the opening possession of the second half and scoring on a 1-yard run by Ronnie Rivers for a 17-3 advantage.

But Boise State stormed back, scoring on consecutive possessions on a pair of short runs by Mattison to knot the score at 17.

THE TAKEAWAY

Fresno State: The Bulldogs’ faint hopes to emerge from the Group of 5 and earn a berth in a New Year’s Six bowl dimmed with the loss. However, they still have a chance to win the West division and get back to the conference title game.

Boise State: With the season hanging in the balance, the Broncos showed they have the fortitude to do what it takes to win close games for the second straight week. The Broncos still have plenty of work to do in order to get an opportunity to defend their conference title, including a home date in two weeks against Mountain division leader No. 14 Utah State.

POLL IMPLICATIONS

Fresno State will fall after the close loss on the road, but not far enough to drop out of the poll altogether. Boise State, which hasn’t been ranked since the third week of the season, might have a chance to crack the top 25 again with some help on Saturday.

UP NEXT

Fresno State: The Bulldogs return home Saturday to face San Diego State with a berth in the conference title game on the line.

RELATED: San Diego State defense comes up big in 19-13 win over Boise State

Boise State: The Broncos will travel to New Mexico on Friday.