ANNAPOLIS, Maryland — After taking a big, first-half lead against the Temple in the Military Bowl, the game began to unravel for Wake Forest.

The Demon Deacons suffered a blow when quarterback John Wolford went down with a neck injury after throwing for a pair of touchdowns. The defense, which had been dominant, suddenly had no answer for the Owls’ attack.

In the end, though, Wake Forest found a way to come up with the biggest play of its season.

The Demon Deacons made a stop on a 4th and 3 in the final minute of the fourth quarter to hold off the furious rally by No. 24 Temple for a 34-26 victory on Tuesday.

Wake Forest (7-6) secured their first bowl victory and winning season since 2008. Temple (10-4), which won the American Athletic Conference championship, fell short in its bid for the first 11-win season in program history.

“I’m sure proud of our football team,” Wake Forest coach Dave Clawson said. “It’s not just a one-season deal. It’s a three-year deal. To get Wake Forest back to a bowl and win a bowl championship and finish with a winning season for the first time since ’08 and to finish the year by beating a ranked opponent, it’s a great feeling.”

Temple quarterback Phillip Walker was 28 of 49 for a Military Bowl-record 396 yards with two touchdowns and an interception.

After scoring a touchdown on its first snap, Temple allowed 31 consecutive points before Aaron Boumerhi managed a 45-yard field goal just seconds before halftime. The Owls finally regained some momentum when Walker found Adonis Jennings for a 58-yard touchdown pass on the first possession of the third quarter to cut the lead to 31-17.

Wolford was ruled out with a neck strain on the ensuing possession. Kyle Kearns entered for Wake Forest and was intercepted by Delvon Randall in the endzone.

“I landed on my head when I feel,” Wolford said. “My shoulder went kind of numb when I fell. I was just really stiff after I got to the sidelines. I didn’t know the extend of the injury. I wanted to play, but it was probably the safest thing (to come out).”

The Owls took advantage with another 24-yard field goal by Boumerhi that pulled them to within 31-20 with 3:51 left.

Boumerhi hit a 32-yard field that pulled the Owls to within eight points with 9:36 remaining. The Owls threatened again, but Walker was sacked by Duke Ejiofor and Willie Yarbary for a 22-yard loss on a second and goal. Temple had to settle for a 38-yard field goal by Boumerhi and Wake Forest led 31-26 with 3:36 left.

Ejiofor finished with six tackles, half a sack and an interception. Wake Forest linebacker Thomas Brown was named MVP with seven tackles, a forced fumble and a sack.

“It feels amazing,” Brown said. “We’ve worked so hard these past three years. I am just trying to fight back tears right now. It such a great feeling I really don’t know how to describe it. Me and the rest of the senior class have been grinding since January 2014 to get to this point right now. We just hope that this team rises up and keeps going once we depart.”

The Demon Deacons got a boost when John Armstrong returned the ensuing kickoff 80 yards to the Temple 15. However, they could only manage a 30-yard field goal by Mike Weaver.

Wake Forest then stopped Temple on its final drive for the win.

Ed Foley, Temple’s director of football operations, was named the interim coach for the game after Matt Rhule left to take the head job at Baylor. The Owls hired Geoff Collins, the former defensive coordinator at Florida, as Ruhle’s full-time replacement.

“I was absolutely proud of the way they came back toward the end, made it a one-score game,” Foley said. “We were trying to be the best Temple team ever. Obviously, we’re tried for the best Temple team ever. It doesn’t sound great but we are champions.”

Temple wasted little time getting a big play when safety Sean Chandler intercepted Wolford on the game’s opening drive. That set up a 48-yard touchdown pass from Walker to Jennings for the early lead.

From there, though, the Demon Deacons took full control.

Wolford threw for touchdowns on the next two possessions with a 41-yard strike to Cam Serigne and another 20-yard pass to Tabari Hines. The Owls were held to just minus-5 rushing yards in the first quarter.

The second quarter didn’t get much better for Temple when Sean Chandler lost a punt on his own 11. Cade Carney boosted the Wake Forest’s lead to 21-7 with a touchdown run on the next play.

An interception by Ejiofor led to a 3-yard run by Matt Colburn extended the lead to 31-7 with2:34 left in the half.

NOTES: It was the sixth time Temple played in a bowl. The Owls lost to Toledo 32-17 in the Marmot Boca Raton Bowl last season. … Wake Forest made its 11th all-time bowl appearance and now have a 7-4 in those games. … Temple beat Wake Forest 36-0 in their only other meeting on Nov. 1, 1930.