STATE COLLEGE, Pa. (AP) The largest crowd in Beaver Stadium history, a sparkling whiteout, was rocking. Penn State and its dynamic and gritty quarterback Trace McSorley had Ohio State reeling midway through the fourth quarter.

And then just like that, everything changed, and for the second year in a row the Buckeyes swiped victory away from the Nittany Lions in another wild game between the Big Ten powerhouses.

Dwayne Haskins threw two touchdown passes in the final seven minutes as No. 4 Ohio State wiped out a 12-point deficit to beat No. 9 Penn State 27-26 Saturday night.

''That sideline was not giving up,'' Ohio State coach Urban Meyer said. ''There was a time, now, you looked up and saw those white pom-poms and that whole deal and thought that was over.''

McSorley set a school record with 461 yards of total offense, including a career-high 175 rushing and threw two touchdown passes, and the Nittany Lions (4-1, 1-1) went up 26-14 with 8 minutes left in the fourth quarter on a 1-yard TD plunge by Miles Sanders.

The record-breaking crowd of 110,889 was singing along to ''Sweet Caroline'' and ''Livin' on a Prayer.'' It looked like the Nittany Lions would get another home victory against the Buckeyes (5-0, 2-0) like they did in 2016.

Instead, for the second straight season, Ohio State made a fourth-quarter rally from a double-digit deficit. As far as Penn State coach James Franklin has taken the Nittany Lions in four-plus seasons, he said they can't quite consider themselves an elite program until they start closing out games like this. And he promised to change it.

''It's not going to happen again,'' Franklin said. ''I'm not a negative guy. But I am going to make sure that as our program, that we do everything right and we grow every single day and we challenge ourselves every single day and we get uncomfortable, we get comfortable being uncomfortable and break out to that next phase.''

The game flipped quickly.

Haskins connected with Binjimen Victor, who weaved and slipped through tacklers for a 47-yard touchdown catch and run that cut it to 26-21 with 6:42 left.

Meyer said Victor, a junior who Ohio State has been waiting to blossom, ''gave us hope.''

Penn State could not put the Buckeyes away with a closing drive, but the Nittany Lions buried Haskins and Ohio State at their own 4 with 4:35 left on the clock.

''It was tough, but we wanted it to be tough,'' Haskins said.

A screen to J.K. Dobbins got 35 and took Ohio State out of the hole. Mixing runs and passes, the Buckeyes worked their way into Penn State territory. Haskins hit K.J. Hill with a quick pass to the outside and the receiver picked up a couple of blocks, broke a tackle and went in for a 24-yard score that made it 27-26 with 2:03 left.

''One of the great drives in Ohio State history,'' Meyer called it.

McSorley and Penn State could not come up with a response. On fourth-and-5 from the Ohio State 43, McSorley handed off to Sanders on a read option and the back was smothered by Chase Young.

''We obviously didn't make the right call in that situation, and that's on me, nobody else,'' Franklin said.

Meyer said Ohio State expected Penn State to give McSorley an option to run.

''It was very emotional,'' McSorley said of the Penn State locker room after the game. ''It was just one of those things where you lose by one point and everyone's mind, immediately, it's just, what could I have done better?''

THE TAKEAWAY

Ohio State: The Buckeyes now have two come-from-behind victories away from Columbus against quality competition, adding this one to the TCU win two weeks ago. Yet, still, there seems to be much work to do. Penalties and a propensity to give up long gains continue to dog Ohio State.

Penn State: The winner of this game has won the Big Ten the past two seasons. The Nittany Lions can still think conference title and College Football Playoff, but their road will be tough with games remaining against No. 21 Michigan State, No. 15 Wisconsin and No. 14 Michigan still left. And no tiebreaker against the Buckeyes in the East Division.

OBJ-ESQUE

Penn State receiver Juwan Johnson made what could go down as one of the best catches of the season in the first half. Conjuring up comparisons to Odell Beckham's famous one-handed grab against Dallas in 2014, the 6-foot-4 Johnson reached high as he was falling back and made a right-handed grab for 31 yards down the sideline.

UP NEXT

Ohio State is home to play Indiana next week.

Penn State is off next week before hosting No. 21 Michigan State on Oct. 13.

---

Follow Ralph D. Russo at www.Twitter.com/ralphDrussoAP and listen at https://www.podcastone.com/AP-Top-25-College-Football-Podcast

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.