DALLAS (AP) — Tanner Mordecai passed for 336 yards and three touchdowns, and he rushed for 74 yards and a score to help SMU beat Navy 40-34 on Friday night.

All four of Mordecai’s touchdowns went for 20-plus yards. Mordecai raced up the middle for a 60-yard touchdown run to begin SMU’s 20-point scoring run in the third quarter. Mordecai also had a short pass to Jordan Kerley, who used two good blocks along the sideline to race for a 33-yard touchdown.

Mordecai connected with Roderick Daniels Jr. from 27-yards out for a 40-20 lead midway through the fourth. SMU recovered Navy’s onside kick with 2:30 left but went three-and-out before the Midshipmen scored with nine seconds left to cap the scoring.

Dylan Goffney had a team-high four catches for 116 yards, including a 24-yard touchdown for SMU (3-3, 1-1 American Athletic Conference).

Quarterback Tai Lavatai carried it 25 times for 121 yards and two touchdowns for Navy (2-4, 2-2). Lavatai was 9-of-22 passing for 137 yards with two touchdowns and an interception.

Navy’s third pass attempt of the game went to Punahou alum, Vincent Terrell Jr., for a 24-yard touchdown with 14 seconds left before halftime. Navy opened the second half with a 75-yard drive, ending in Lavatai’s 15-yard touchdown run.

Former President George W. Bush was in attendance.