DALLAS (AP) — This time, SMU's comeback was good for an American Athletic Conference victory.

For the second time this season in their new conference, the Mustangs wiped out a 21-point deficit Saturday.

They also won the game over Temple 59-49.

Trailing by 21 points during the second quarter, SMU scored 45 after halftime in a record-setting explosion.

Mustangs head coach June Jones was a prophet at halftime, when they trailed 28-14.

"I told them that we gave (Temple) everything that they had. I challenged our defense to stop them on the first series, and then if the offense scored on their first series we were going to win the game."

The defense pushed the Owls back five yards in a three-and-out first series. Quarterback Garrett Gilbert drove SMU 78 yards for a touchdown. The Mustangs won the game.

Gilbert finished the game with a school record 538 passing yards, four touchdown passes and 97 yards and two more TDs rushing. His passing yards and SMU's 728 yards of offense were the most ever against Temple. The quarterback's 635 yards of total offense were an SMU record and the seventh-highest total in FBS history.

Jones said, "Garrett has played extremely well. He's competing, and he gives us a tremendous advantage."

"Gilbert's a tremendous quarterback," Owls head coach Matt Rhule said. "We saw what he did in the end of the game against Rutgers."

In that game, Gilbert had brought SMU back from a 35-14 fourth-quarter deficit before his team lost in triple overtime. That day, he set the record of 484 passing yards that he broke Saturday.

For the Owls (1-7, 0-4 conference), freshman P.J. Walker completed his first 16 passes, including three for touchdowns.

Walker finished 26 for 37 for 293 yards and four touchdowns, and led Temple with 92 yards and another TD rushing. For the first time in his three starts since taking over from junior Connor Reilly, Walker did not throw an interception.

Temple's Robby Anderson had a career day with nine catches for 239 yards and his first two collegiate touchdowns.

SMU linebacker Randall Joyner said, "Definitely they surprised us. We'd seen them on film. We knew they were transitioning to the spread, but the switch at quarterback makes things go."

After the Mustangs scored on Traylon Shead's 11-yard run, the Owls took a 14-7 lead on Anderson's scoring catches. Walker hit Anderson on a screen pass, and the sophomore raced behind blockers for a 42-yard touchdown. On the next possession, Anderson got behind SMU's defense to catch an end-around pass from wide receiver Jalen Fitzpatrick for an 83-yard TD.

Walker's 16 consecutive completions included 18-yard touchdown passes to John Christopher and Ryan Alderman.

"Credit (Temple). They came out and took advantage of some of the mistakes we were making," Gilbert said.

"They made some plays and put us in a hole, which we dug ourselves a little bit. This team has a never-say-die attitude, as we continued to fight when we were down by three scores."

SMU (3-4, 2-1) took the lead for good with 9:49 remaining. After Deion Sanders Jr. returned a kickoff 87 yards to the Temple 8-yard line, Chase Hover kicked a 21-yard field goal for a 45-42 lead.

The Mustangs' Keenan Holman caught 10 passes for 209 yards and three touchdowns. Teammate Der'rikk Thompson added nine receptions for 158 yards and one score.

SMU caught up at 35-35 with 2:29 remaining in the third quarter after Gilbert hit Holman in stride with a deep pass for a 64-yard touchdown.

"I love it when I can run and the ball just comes in to me," Holman said. "This was the best game I've ever played."

Temple then tried a fake punt that failed. The Mustangs took over at the Temple 28 and drove in for Prescott Line's 2-yard touchdown run and a 42-35 lead.

Walker and the Owls then came back. His 49-yard pass to Anderson set up a 4-yard scoring toss to Kenneth Harper before Sanders' long kickoff return.