J.T. Barrett connects on three touchdowns in the fourth quarter, including the go-ahead score to Marcus Baugh, and the Buckeyes knock off Penn State 39-38. (2:30)

COLUMBUS, Ohio -- J.T. Barrett's legacy at Ohio State is safe.

Barrett threw 13 passes in a fourth quarter while his program's hopes of a win, a Big Ten title shot and a return trip to the College Football Playoff hung in the balance. He completed all 13 of them.

The fifth-year senior, some six weeks removed from his fan base questioning whether he belonged in the starting lineup, threw for 328 yards and four touchdowns, leading his team in a comeback that will long be remembered at the Horseshoe. He and the No. 6 Buckeyes spent more than 50 minutes trying to climb out of a two-touchdown hole before Barrett found tight end Marcus Baugh in the back of the end zone with less than two minutes left to hand Penn State its first loss, 39-38.

J.T. Barrett completed 33 of 39 passes - including 13 in a row during the fourth quarter - for 328 yards and four touchdowns in the win over No. 2 Penn State. Aaron Doster/USA TODAY Sports

No. 2 Penn State has owned the first quarter in all eight of its games this year. The Nittany Lions did again in Columbus, but the fourth quarter belonged to Ohio State's veteran quarterback. After setting a conference record for career touchdown passes in the second quarter, Barrett passed for three more of them -- all in the final quarter.

He connected with Johnnie Dixon on a 38-yard pass through the middle of Penn State's defense -- a group that led the nation in points allowed before surrendering 39 to Ohio State's revived attack. That came on the heels of a blocked punt. Seven minutes later, Dixon came open again in the end zone, this time from 10 yards out.

Baugh, who dropped a pass when things were spinning against his team in the first few moments, redeemed himself on the go-ahead drive. His touchdown capped a five-play drive that went 58 yards. Two yards on the ground for Barrett, followed by four straight completions.

Penn State called timeout with 39 seconds left, giving Barrett one more chance to take a knee at center stage before his teammates and Buckeyes fans spilled onto the field to celebrate. He has put himself and his team in position to negate an early season loss to Oklahoma that started the questions swirling about his ability to win big games. Those are quelled for now. Four more outings stand between the Buckeyes and an unbeaten league record. From there, a chance to play for a championship might be waiting for them.