STATE COLLEGE, Pa. (AP) Trace McSorley visited the injury tent. Not much in there, he said. Just a table for him to sit on while his right knee was being checked out in the second quarter of Penn State's game against Iowa.

''It's kind of cramped,'' McSorley said.

The senior quarterback, barely 6-feet tall and 200 pounds but able to carry Penn State's offense, has started 35 straight games and only has two more left at Beaver Stadium. He was not about to sit out the second half of this one.

McSorley returned after giving Penn State a scare, and the 17th-ranked Nittany Lions made two late defensive stands to escape No. 18 Iowa 30-24 on Saturday, avoiding a third straight home loss.

Nittany Lions safety Nick Scott intercepted a pass at the 2 with 3:18 left in the fourth quarter to thwart one Hawkeyes drive and Penn State (6-2, 3-2 Big Ten) needed one more stop after that. Iowa (6-2, 3-2) drove to the Nittany Lions 44 in the final minute.

On fourth-and-10 with 7 seconds remaining, Penn State's pass rush swarmed Nate Stanley, who flipped backward to offensive tackle Tristan Wirfs. The 300-pounder rumbled 15 yards before being dragged down with no time left.

It was a fitting end to what Iowa coach Kirk Ferentz called ''kind of an unusual game,'' with little sustained offense on a chilly and rainy day. Iowa had two safeties and a touchdown pass by punter Colten Rastetter to defensive tackle Sam Brincks on a faked field goal in the first half, and a pick-six in the second half.

Penn State played three series in the second quarter without McSorley.

''Gutsy win,'' Penn State coach James Franklin said.

McSorley was sandwiched by two Hawkeyes as he tried to scramble and stayed down, grabbing his right leg. The Beaver Stadium crowd fell silent as athletic trainers attended to him. McSorley got up with assistance and limped off.

Tommy Stevens played the next two series at quarterback for Penn State, scoring on a 3-yard run. He also led a short drive late in the first half to set up Jake Pinegar's career-best 45-yard field goal to make it 17-all. The freshman kicker from Iowa added a 49-yarder in the third quarter and 44-yarder in the fourth.

McSorley went back in for one series in the first half and Penn State went three-and-out.

On the sideline, he got encouragement from his sister and his father. He tried to stay loose, riding the stationary bike, running and cutting.

Franklin said he planned to start the second half with Stevens.

''Trace has earned the right to tell us if he thinks he can go,'' Franklin said. ''I said: `Look I need to the whole package. I can't just have a pro-style quarterback. I got to have more than that.'''

Wearing a knee brace, McSorley delivered. On Penn State's first possession, he broke free for a 51-yard touchdown run to give the Nittany Lions their first lead, 24-17, with 12:10 left in the third quarter.

''I wasn't really going to know until I got out there,'' said McSorley, who finished with 167 yards passing and 63 rushing.

Trailing 30-24 in the fourth quarter, Iowa drove to first-and-goal at the 3 with 3:30 left. But Stanley threw a quick pass toward star tight end Noah Fant, who was not looking.

Ferentz said the Hawkeyes were discombobulated and should have called a timeout.

''I was just trying to change the play based on the look that they gave us,'' said Stanley, who was 18 for 49 for 205 yards and two interceptions. ''I just tried to rush it with the play clock running down. I just should have taken the timeout.''

Scott jumped up and made the interception.

''This one's going to hurt,'' Ferentz said.

THE TAKEAWAY

Iowa: The Hawkeyes have lost three straight years to Penn State and five straight overall in the series, but they are still very much in contention to win the Big Ten West.

Penn State: The Nittany Lions had lost their last two home games, to Ohio State and Michigan State, by blowing fourth-quarter leads. They last lost three straight at home in 2015. Penn State has played four straight games decided by six points or fewer for the first time since 1894.

''One of the good things about today was we were able to come out on the positive end of one of these games,'' McSorley said.

POLL IMPLICATIONS

Penn State will move up a few spots. Iowa is likely to drop. All the way out? Probably not.

NEXT UP

Iowa: The Hawkeyes go to Purdue.

Penn State: The Nittany Lions travel to No. 5 Michigan.

---

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

---

More AP college football: https://apnews.com/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.