STATE COLLEGE, Pa. -- As Christian Hackenberg walked off the field Saturday, his blue jersey and white pants were nearly as clean as when he walked out of the tunnel four hours earlier.

It was a welcome sight for the Penn State junior quarterback's teammates, coaches and Penn State fans who watched as Hackenberg was sacked 10 times the week before. But a reshuffled offensive line with kept Buffalo pass rushers off Hackenberg and Penn State's offense slowly built momentum to outlast Buffalo 27-14.

"We protected our quarterback, moved the pocket, ran the ball," coach James Franklin said. "I thought our defense had some momentum-changing plays with sacks and interceptions today and turnovers. So I thought at times we started to create an identity for this football team."

True freshmen Brandon Polk and Saquon Barkley each ran for touchdowns for Penn State (1-1). Hackenberg completed 14 of 27 passes for 128 yards and a touchdown and Joey Julius kicked a pair of field goals in the 27-14 win.

Buffalo quarterback Joe Licata tossed touchdown passes to Ron Willoughby and Marcus McGill.

But the Bulls struggled to move the ball into the red zone for most of the afternoon. Buffalo (1-1) punted nine times, turned the ball over on downs once and Licata was intercepted by defensive end Carl Nassib in the second quarter.

Nassib led Penn State's defense with three sacks while tackle Austin Johnson led the Nittany Lions with nine tackles.

"It starts with them," senior safety Jordan Lucas said. "They're the heart and soul of our defense. They create pressure, they stop the run and they do everything a front line is supposed to do."

After the teams traded futile opening possessions, Bulls kicker Adam Mitcheson missed a 47-yard field goal that would've given the Bulls a first-quarter lead.

Penn State took a lead it would never relinquish and got help from its special teams to do so.

Redshirt freshman DeAndre Thompkins returned a second-quarter punt 58 yards to set Penn State's offense up in the red zone. Two plays later, Polk took a sweep around the left side of Buffalo's defense untouched for a 22-yard score.

"I thought we did a pretty good job of executing and stringing things together," Hackenberg said.

Joey Julius added a 22-yard field goal in the second quarter and the Nittany Lions led 10-0 at halftime. The Bulls used their second possession of the second half to go 78 yards with 11 plays. The drive ended when Licata hit Willoughby in the corner of the end zone and the Bulls' receiver fought off tight coverage from Christian Campbell to secure the catch.

Penn State responded with a 12-play scoring drive but had to settle for a 21-yard field goal from Julius after sophomore tight end Mike Gesicki dropped two would-be touchdown passes -- one at the goal line. Julius' kick gave Penn State a 13-7 lead.

It was the first of three consecutive scoring drives for the Nittany Lions. Barkley ripped off a 33-yard run then hurdled a Buffalo defender en route to a 17-yard gain to set up Hackenberg's 5-yard touchdown pass to DaeSean Hamilton that gave Penn State a 20-7 lead. Hackenberg hit Chris Godwin for a 38-yard gain down the sideline before Barkley plunged in from nine yards out to cap Penn State's scoring.

Penn State's reshuffled offensive line -- Andrew Nelson moved to left tackle, Brendan Mahon moved to right tackle from left guard and Derek Dowrey started at left guard -- gave Hackenberg time to take the deep shot. Hackenberg had no such time in the season opener wherein Penn State threw deep just once.

But Penn State lost Nelson to an unspecified injury in the first half. Nelson was helped off the field and did not return. Palmer took his spot in the lineup.

Licata hit McGill from 10 yards out with less than five minutes to play.

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)

More From 97.3 ESPN