The Nittany Lions (3-1) had little trouble moving the ball until they got inside the 40, but Wagner's right leg bailed them out. His 21-yarder with 1:38 left in the third quarter finally gave Penn State a 15-13 lead.
Temple (3-1) had been outscored 154-9 in its previous four games with Penn State, but took a 13-6 lead in the first quarter on Bernard Pierce's two touchdown runs. He later left the game with an apparent right ankle injury, and the Owls offense stalled after halftime.
Fans at Beaver Stadium breathed a collective sigh of relief after Michael Zordich's 2-yard touchdown run gave Penn State an eight-point lead late in the fourth.
The Nittany Lions could have had more, but stalled when they drove into Temple territory. Temple's turnaround nearly project took a huge step forward in Happy Valley. They haven't beaten Penn State since 1941.
But the Nittany Lions swarmed Temple quarterback Chester Stewart, who had to assume the workload with Pierce out. Stewart finished 8 of 19 passing for 46 yards and three picks.
His Penn State counterpart, true freshman Rob Bolden, finished 18 of 28 for 223 yards. He looked out of sync at times in the red zone, but made some key completions to help set up Zordich's TD with 3:35 left to cap a 12-play, 96 yard drive.
Things looked good early on for Owls coach Al Golden, a former player and assistant under Joe Paterno. Temple outplayed its opponents using the time-worn Penn State blueprint of pouncing on mistakes and turnovers, and getting just enough production out of the running game.
Pierce, a sophomore touted by Temple as a Heisman Trophy candidate, scored his first TD with 9:06 left, 58 seconds after Evan Royster fumbled at his own 28, to give the Owls a 7-3 lead.
After the second of Wagner's three first-half field goals cut Temple's lead to 7-6, Pierce scored again with 10 seconds left in the first quarter on nearly the exact same play into the same corner of the end zone. A botched hold on the extra-point attempt left the score 13-6.
The Owls arrived in Happy Valley fresh with confidence from a 30-16 victory last week over Connecticut, the school's first victory over a power-conference program since 2004.
Flush with more talent thanks to Golden's tireless recruiting, expectations are higher for the Mid-American Conference favorites after a breakthrough 2009 campaign in which Temple had its first winning record (9-4) since 1990 and played its first bowl game (a 30-21 loss to UCLA in the EagleBank Bowl) since 1979.
It was closer than many fans expected, but the Nittany Lions eventually came away with their 28th straight win over the Owls.
Royster had a breakout game, getting 26 carries after struggling for 110 yards on 31 carries over his first three games.