SAN JOSE, Calif. -- Fresno State quarterback Derek Carr had a half worthy of a Heisman Trophy candidate by throwing six touchdown passes before halftime.
But Carr's effort and the Bulldogs' bid for a BCS game berth were undone by San Jose State quarterback David Fales and the Spartans in a wild offensive showcase.
Fales also threw six touchdown passes in the first half, leading the Spartans to a 62-52 victory over the No. 16 Bulldogs on Friday afternoon at Spartan Stadium.
San Jose State (6-6) ended a three-game losing streak and became bowl eligible for the second straight year by winning its regular-season finale.
"It was a very exciting day for San Jose State," first-year Spartans coach Ron Caragher said. "We knew the ship could be righted if we won this last game."
The loss dropped Fresno State to 10-1, knocking the Bulldogs out of contention for a spot in a BCS game and opening the door for Northern Illinois to claim a BCS game berth.
"That would have been a feather in our cap," Bulldogs coach Tim DeRuyter of the chance to play in a BCS game, "but we have to worry about our No. 1 goal and that's to win a Mountain West championship."
The Bulldogs will play in the Mountain West title game but missed a chance to finish the regular season unbeaten. That was difficult for Carr to swallow.
"Man, it's hard," said Carr, who has 45 touchdown passes for the season, tops in the country. "If you like losing, there's something wrong with you."
Fales finished 36-of-44 for 543 yards, six touchdowns and no interceptions. Carr was 38-of-50 for 519 yards, six touchdowns and one costly interception.
Fresno State wide receiver Davante Adams had 13 catches for 264 yards and three touchdowns.
Three San Jose State wide receivers exceeded 100 yards in receiving -- Chandler Jones (eight catches, 146 yards, three touchdowns), Kyle Nunn (10 catches, 160 yards, two touchdowns) and Tyler Winston (10 catches, 164 yards, one score).
San Jose amassed 736 yards of offense, and the teams combined for 1,382 yards, the most in an FBS game this season. The two teams compiled 1,006 yards in the first half, which ended with San Jose State leading 42-41.
However, the Bulldogs were limited to three points in the second half before scoring their only second-half touchdown with 2:03 left in the game.
Ultimately, an onside kick by San Jose State to open the second half and an interception by Spartans linebacker Keith Smith proved to be the pivotal plays.
The lead changed hands eight times in the wild first half, which ended with the Spartans leading by one point.
While walking back on the field for the second half, Caragher spoke to assistant coach Terry Malley, who suggested an onside kick might be in order. Malley had experience in the scoring-crazed Arena Football League and he knew how much a stolen possession could be in such games.
"They were moving the ball against us," Caragher said. "Whether we gave them a short field or a long field, it didn't really matter. That extra possession made the difference."
DeRuyter said he had warned his team at halftime about the possibility of onside kick. But Spartans kicker Harrison Ward recovered the onside kick, and the Spartans turned it into a touchdown that gave the Spartans a 49-41 lead.
The Spartans held a 59-44 lead when Smith picked off a Carr pass with 10:47 left in the game, ending Carr's streak of 305 pass attempts without an interception.
"I was surprised he threw that ball," Smith said.
The Bulldogs were limited to three points in the second half before scoring their only second-half touchdown with 2:03 left in the game.
"To be able to stop (Carr) at some key times was big and probably the difference in the game," Caragher said.
Fales and Carr combined for 12 scoring passes in the first half, which was just two shy of the FBS record for touchdown passes in a game by both teams.
The scoring came at a furious pace in the first half.
"That first half went on for a long time," Caragher said. "It went on and on."
Carr's sixth touchdown pass -- a 21-yarder to Isaiah Burse -- put Fresno State on top 41-35 with 1:43 left in the second quarter. But Fales' sixth scoring pass -- a 19-yard toss to Jones with 18 seconds left in the half -- gave San Jose State a lead it never lost at 42-41.
NOTES: Fresno State will host the Mountain West Conference championship game on Dec. 7 against either Boise State or Utah State. ... Eighteen NFL scouts were scheduled to be at the game to take a look at Fresno State QB Derek Carr and San Jose State QB David Fales, both of whom are expected to be drafted. ... Fresno State WR Josh Harper caught a 27-yard touchdown pass on the Bulldogs' first possession. But he injured his knee on the play and was forced to leave the game. He did not return....The game was delayed for several minutes in the second quarter while a Fresno State cheerleader was taken off the field on a stretcher after having an apparent seizure. ... San Jose State has played in bowl games in consecutive seasons only once -- 1986 and 1987 -- and it has never won bowl games in consecutive years.