Navy’s Tyler Carmona catches the game-winning touchdown in front of Air Force’s Marquis Griffin with 15 second remaining. (Patrick Semansky/Associated Press)

When Navy quarterback Zach Abey zipped one final, frantic, 16-yard pass for the last touchdown in the highest scoring game of the historic Navy-Air Force rivalry, the frenzied crowd at Navy-Marine Corps Memorial Stadium could, at last, exhale. The 48-45 victory, which had seemed a foregone conclusion with Navy up three touchdowns in the third quarter, required every bit of heroics Abey and receiver Tyler Carmona could muster on Navy’s final offensive snap with 15 seconds remaining.

And it was a victory that belonged entirely to the offense, built on coordinator Ivin Jasper’s game plan, one year after he took the blame for Navy’s loss to the Falcons.

To top it off, Jasper’s 14-year-old son, Jarren, was in attendance for the first time all season. The teenager is awaiting a heart transplant and came home Thursday after spending two months at Children’s National Medical Center in Washington because of complications from a surgery in August.

Navy Coach Ken Niumatalolo cried as he praised Jasper, his longtime friend, after the game.

“I’ll tell you what, he and the whole offensive staff came up with a masterpiece today — I don’t know how he did it,” Niumatalolo said, pausing to clear his throat. “Some mornings I come in, and he’s just pulling in from the hospital, wearing the same clothes from the previous day. It’s hard enough to be a Division I football coach, but to go directly to the hospital right after work and come in the morning and start early again the next day — I have no idea how he did it. But he and the offensive staff came up with a great, great masterpiece.”

“It was the end to a great weekend,” Jasper said, “for myself and our family. I’m just truly, truly happy.”

Saturday’s game gave Navy a win in the first leg of competition for the Commander-in-Chief’s Trophy and improved the Midshipmen to 5-0 for the first time since 2004. Abey’s game-winning drive inspired the midshipmen in the stands among the record crowd of 38,792 to rush the field.

The game featured 1,178 yards of offense — 811 on the ground — and a Falcons rally from a 38-17 deficit more than halfway through the third quarter to take a 45-41 lead with less than two minutes remaining.

But Abey was not done. He had 214 of Navy’s 471 rushing yards, the most Navy has amassed in series history, a year after the run game wilted in Colorado Springs. The Midshipmen were held to 57 rushing yards in last year’s 28-14 loss, which helped the Falcons wrest away the Commander-in-Chief’s Trophy.

“The goal wasn’t to beat Air Force; this was just the first step,” linebacker D.J. Palmore said of the trophy.

Abey also had two touchdowns on his 29 carries. It was his second 200-yard rushing game of the season, tying him with several former quarterbacks, including Keenan Reynolds, for the school record.

The junior also completed 4 of 11 passing attempts for 86 yards and two touchdowns. But the game-winning drive, which covered 75 yards in 98 seconds, was bookended by his arm: In addition to the touchdown pass, Abey converted fourth and three from the Navy 32-yard line with a 25-yard completion to Brandon Colon.

“We don’t like to lose to other service academies, and that was something I was able to feel last year,” Abey said, referring to last year’s loss to Army. “With Air Force, just being back in the locker room, that’s something we didn’t want to feel again, especially being in our own stadium. . . . I don’t think we had any doubt we were gonna win it.”

Slotback Malcolm Perry played a big part in Navy’s confidence from the start. Abey’s 40-yard scoring pass to Perry gave the Midshipmen a 28-7 lead with less than two minutes to play in the first half, capitalizing on an Air Force fumble that Palmore recovered and ran to the Falcons’ 40. It was Perry’s first career touchdown reception — he spent last year playing quarterback — and it capped a remarkable first half for the sophomore.

Perry opened the scoring with a 91-yard touchdown run on Navy’s second possession of the day. That tied Pat McGrew, in a 1997 game against Kent State, for the second-longest run in school history, coming up two yards short of a 93-yard dash by John Sai in 1963.

He finished the game with 172 yards from scrimmage — 127 rushing and 45 receiving — on four carries and two receptions.

“We just got to be careful that we don’t wear his legs off,” Niumatalolo said. “Who do we want to give the ball to? Everyone says, ‘Malcolm, Malcolm, Malcolm.’ He’s done phenomenal.”

The offense, rollicking as it was, made up for a subpar second half from Navy’s defense.

Air Force (1-4) had 621 yards of offense, its most this season. The Falcons scored five touchdowns in the second half; they took their first lead with 1:53 to play when quarterback Arion Worthman hit a wide-open Marcus Bennett for a 51-yard score that put Air Force up 45-41.

Worthman completed 9 of 16 passes for 257 yards and two touchdowns, to go with 139 yards rushing and two more touchdowns on 20 carries.

Jasper and his young son each took home a game ball after the win.

“My son coming home on Thursday, a real big win this weekend …” Jasper said, trailing off. “This couldn’t have been written any better.”