SAN DIEGO(AP) Max Hall was supposed to spike the ball, giving No. 18 Brigham Young time to kick a field goal before the first-half clock expired.
Hall, the do-everything quarterback, had other plans. Out of timeouts, he took the snap and, with the clock winding down, ran untouched around left end for a 1-yard score and a 21-14 lead over scrappy San Diego State.
BYU went on to beat SDSU 38-28 for the 500th victory in school history.
Hall threw for 346 yards and three touchdowns, but it was his keeper that was the play of the game.
BYU used its last timeout with 32 seconds before halftime, and Hall then completed a 6-yard pass to tight end Dennis Pitta for a first-and-goal on the 1. Hall tried to score on a keeper but was stuffed for no gain.
Hall made the best out of a chaotic situation. The coaches were hollering for him to spike the ball, but he said he didn't hear them. Hall was signaling that he was going to try another sneak.
With the clock running down, the Cougars quickly lined up, Hall took the snap and ran untouched for a 21-14 lead.
''They had four guys in the A gap, so I just took off to the outside with it,'' he said. ''It was one of those last-minute decisions where I thought, 'This is either going to be really good or really bad.' It turned out pretty good.''
Coach Bronco Mendenhall said he was upset because the Cougars didn't manage the situation well.
''We had players laying on the ground; one guy lost his helmet, he was trying to get that back on, so we were trying to get back aligned,'' Mendenhall said. ''Max saw the clock running out, grabbed it and just took it on his own initiative, went around the end and scored a touchdown, which was phenomenal. If he wouldn't have scored I would have been upset, but he scored, and how do you now take that away from him? So it was a really nice job.''
Tight end Andrew George suspected that Hall heard the calls to spike the ball.
''But that's Max - that's what makes him great,'' George said.
''You have to give them credit,'' SDSU coach Brady Hoke said. ''I think everyone thought he was going to spike the ball and instead he takes it around the left end. That's what a veteran and a seasoned quarterback will do.''
BYU (6-1, 3-0 Mountain West Conference) beat SDSU (2-4, 0-2) for the eighth time in the last nine games, although the Cougars said the Aztecs appeared much improved under first-year coach Hoke.
Running an effective no-huddle offense, Hall was 27 of 39 for his fifth 300-yard game of the season.
Hall also carried 14 times for 51 yards.
''When you don't get the quarterback on the ground ... he scrambled way too many times without getting hit,'' Hoke said. ''And that is a lack of intensity or a lack in the belief that, 'I can make the play in winning.' ''
SDSU's Ryan Lindley also threw three touchdown passes, going 21 of 33 for 298 yards. SDSU kept pace with BYU into the third quarter, tying it at 21 before the Cougars' massive offensive line wore down the Aztecs, allowing Hall to throw two touchdown passes in less than four minutes.
Lindley threw a 36-yard touchdown pass to DeMarco Sampson with 8:23 left in the third quarter to tie it at 21.
Three plays into the ensuing drive, Hall extricated the Cougars from a third-and-19 on the BYU 13 when he threw a 25-yard pass to JJ DiLuigi. Hall finished the drive with a 19-yard TD pass to tight end Andrew George for a 28-21 lead.
After SDSU punted, Hall opened the ensuing drive with a 40-yarder to Luke Ashworth . With his line giving him plenty of time to scramble around, he ended it by throwing a 9-yarder to Pitta, who made a nice diving catch in the right corner of the end zone before tumbling out of bounds for a 35-21 lead one play into the fourth quarter.
With the score tied at 14, BYU free safety Scott Johnson had two big plays to keep the Aztecs from taking the lead for the second time. Lindley completed a 41-yard pass to Vincent Brown , who split two defenders and was headed for the end zone when Johnson made a diving swipe that tripped him up at the 12. Three plays later, Johnson dove in front of Roberto Wallace for an interception just inside the end zone.
After Harvey Unga scored on a 1-yard run on BYU's first drive of the game, SDSU scored on its next two drives to take a 14-7 lead. Lindley threw a 7-yard TD pass to Sampson and Brandon Sullivan scored on a 1-yard run.
BYU came right back and tied it on Hall's 3-yard pass to running back Bryan Kariya .
SDSU had only 20 yards rushing.
Pitta had six catches for 72 yards, giving him 2,543 yards for his career, the most ever by a BYU tight end. The previous best was 2,471 by Gordon Hudson from 1981-83.