FRESNO, Calif. -- Jeff Scott ran for 138 yards and two second-half touchdowns and new starting quarterback Randall Mackey sparked Mississippi's dormant offense in a 38-28 victory against Fresno State on Saturday night.

Brandon Bolden added two touchdown runs for the Rebels (2-3), who capped their first trip ever to California by earning their first win of the season against an FBS-level team.

Robbie Rouse ran for 123 yards and a touchdown and Derek Carr threw for 281 yards and a score for the Bulldogs (2-3), who were unable to get their first win ever against a Southeastern Conference team.

The Rebels had lost all three games against FBS competition, scoring just two offensive touchdowns against BYU, Vanderbilt and Georgia and averaging 236.5 yards per game overall.

That led coach Houston Nutt to make a second change of the season at quarterback, starting Mackey in place of the struggling Zack Stoudt. Stoudt replaced Barry Brunetti in the opener against BYU and started the past three games, but was replaced after completing just 50.5 percent of his passes with six interceptions and two touchdowns.

Mackey, who was suspended for the season opener after getting into a bar fight, completed just 8 of 18 passes for 214 yards. But he was able to deliver some big plays in the passing game, including one TD, and did a good job prolonging plays with his scrambling ability.

He came up big on the 88-yard game-winning drive, completing a 24-yard pass to Scott to get the Rebels moving and adding two more completions and a 9-yard scramble as Ole Miss drove to the Fresno State 12.

Then on third-and-9, Scott dashed around the end and tiptoed down the sideline for the score that made it 33-28. After a false start, Mackey completed a 2-point conversion pass to Donte Moncrief to make it a seven-point game with 8:49 remaining.

Mackey and Moncrief combined on a 57-yard pass play later in the fourth quarter to set up a short field goal by Bryson Rose that made it 38-28 with 3:42 remaining.

The teams traded touchdowns on the opening three drives of the second half with Rouse scoring on a 12-yard run for the Bulldogs and Carr on a 1-yard keeper around Scott's 69-yard scamper for a touchdown. That put Fresno State on top 28-27 heading into the fourth quarter.

Mackey started slowly with his first three passes falling incomplete and the Rebels going three-and-out on their opening two drives. Ole Miss trailed 7-0 on Carr's 2-yard TD pass to Rashad Evans before Mackey and the Ole Miss offense got going.

It started with a 46-yard pass to Ja-Mes Logan that was followed immediately by Bolden's 21-yard touchdown run. Mackey completed two deep balls on the following drive, a 40-yarder to Nickolas Brassell and a 22-yard TD pass to Melvin Harris that made it 13-7 when the extra point was blocked.

Jalen Saunders 26-yard run on an end around put the Bulldogs up 14-13 in the closing seconds of the first quarter but mistakes in the second quarter doomed Fresno State and Ole Miss led 20-14 at the half.

Rouse lost the first fumble of his career on his 401st carry to set up Bolden's second TD run, Carr threw an interception on a deflected ball and Kevin Goessling missed field goals from 32 and 57 yards out. Goessling later missed a 46-yarder in the closing minute of the game.