Mattison's career-high 118 yards leads Boise St by BYU 24-7
Boise State scored 17 straight points in the second quarter to take a 10-point lead into halftime.
Mattison took a direct snap in a wildcat formation and ran it in from the 12 to tie it at 7 in the second quarter. After Kekoa Nawahine intercepted BYU's pass and returned it 51 yards to the Cougars 22, Boise State settled for a short field goal and a 10-7 lead.
Boise State took a two-score lead with 36 seconds left in the half on Sean Modster's first career touchdown catch. Mattison scored the only points of the second half on a 2-yard run early in the fourth to cap an 82-yard drive.
Rypien completed 12 of 19 passes for 125 yards and one touchdown for Boise State (3-2).
Tanner Mangum was 18-of-33 passing for 164 yards and two interceptions for BYU (1-5), which lost its fifth straight for the first time since 1970. Ula Tolutau opened the scoring in the first quarter with a 3-yard touchdown.
More AP college football: http://collegefootball.ap.org and http://www.twitter.com/AP-Top25
Updated October 7, 2017