Updated

Jay Ajayi ran for 158 yards and two touchdowns, including a 54-yard run on Boise State's clinching drive in the Broncos' 37-27 victory over Fresno State on Friday night.

Boise State (5-2, 3-1 Mountain West) avenged a 41-40 overtime loss to the Bulldogs last season to claim the Milk Can rivalry trophy. Fresno State (3-5, 2-2), winless in Boise since 1984, squandered Marteze Waller's 164-yard rushing performance.

Grant Hedrick completed 21 of 30 passes for 190 yards and a touchdown, caught the go-ahead scoring pass and ran for 56 yards for the Broncos.

Fresno State overcame a 10-point deficit to tie it at 27 late in the third quarter. Boise State rebounded with a 17-play, 75-yard drive that ended with receiver Thomas Sperbeck's 9-yard touchdown pass to Hedrick.

"Being on the opposite end of a pass gives me some better perspective," Hedrick said. "It's especially hard when you're really wide open, but Thomas made a great pass. And our defense took control from there."

The Bulldogs scored all three of their touchdowns on drives of two plays or less, and minus-1 yards of offense in the fourth quarter.

"When our defense is firing on all cylinders, we're hard to move the ball against," Boise State coach Bryan Harsin said. "Great defenses finish and we've been able to finish the past two games with our defense on the field."

Dan Goodale added a 24-yard field goal late in the fourth quarter to push the Broncos' lead to 10 and Donte Deayon intercepted a pass to seal the victory.

"For us tonight it came down to execution," Fresno State coach Tim DeRuyter said. "We failed to execute when it mattered in the fourth quarter on both sides of the ball — and Boise State did what they needed to in order to win the game. Now, we've got to regroup and focus on the next game before we can think about winning a conference championship."

Boise State led 20-10 at halftime.

The Bulldogs leaned on its big-play capability to start the third quarter. After Waller ripped off a 38-yard run on Fresno State's first play from scrimmage, Brian Burrell connected with Josh Harper for a 32-yard scoring strike to make it 20-17.

The Broncos responded with a 12-play, 62-yard drive that included four third-down conversions. Hedrick found Williams-Rhodes in the end zone from 21 yards to push Boise State's lead back to 10.

After Kody Kroening kicked a 44-yard field goal to pull Fresno State to 27-20, Boise State fumbled the ensuing kickoff and Stratton Brown recovered at 5. Two plays later, Waller scored from 3 yards out to tie it with 1:57 left in the third quarter.

Burrell was 13 of 25 for 127 yards and ran for 41 yards.