IOWA CITY, Iowa (AP) The easy field goal that coach Kirk Ferentz didn't have to fake nearly cost Iowa the game.

The kick the Hawkeyes had to make wound up rescuing them from a devastating defeat - and saved Ferentz from getting excoriated from frustrated Iowa fans.

Miguel Recinos drilled a 41-yard field goal through a driving rain as time expired and Iowa beat Nebraska 31-28 on Friday despite blowing a 15-point lead in the second half.

Mekhi Sargent ran for a career-high 173 yards and scored twice for the Hawkeyes (8-4, 5-4 Big Ten), who have won four straight over the Cornhuskers for the first time.

''For us, this is a black and gold Friday,'' Ferentz joked.

The Hawkeyes came within inches of making it a black and blue Friday.

Iowa made the risky decision to fake a field goal at Nebraska's 3-yard line up 28-13 late in the third quarter. It failed, and it led to a 98-yard scoring drive from the Huskers to make it 28-20 with 13:57 to go.

''We were going for the kill. Simple as that,'' Ferentz said about holder Colten Rastetter's pass to T.J. Hockenson, which was stopped a yard short. ''We felt like we could really push this thing through.''

Adrian Martinez then ran it from 3 yards out with 3:22 left, and he used his feet to stay alive long enough to find Kade Warner - son of NFL Hall of Famer Kurt Warner - in the back of the end zone to tie it up.

But Hockenson found redemption with a 10-yard catch on a fourth-and-8 with 42 seconds to go. Recinos also came through on a last chance to redeem himself, putting it through the uprights after missing a 37-yarder with 7:54 left at the same end of the field.

''I kind of had a feeling after I missed that one that they were going to score again,'' Recinos said. ''Right after the miss I just reset and just back in it to try and make that kick.''

Sargent scored late in the second quarter on a 15-yard run and early in the third on a 5-yard pass from Nate Stanley to help the Hawkeyes jump ahead 28-13.

It felt like another easy wins over the Huskers was in order. But Nebraska and Martinez, their brilliant freshman quarterback, displayed some impressive resilience in nearly pulling off the comeback stunner.

''Adrian Martinez showed us that he's fearless,'' Nebraska coach Scott Frost said. ''He made a lot of great plays late.''

Instead, Recinos led his teammates around a drenched Kinnick Stadium in a celebration so raucous that Ferentz wound up with a large cut on his cheek courtesy of quarterback Nate Stanley's facemask.

Iowa's supporters then gladly waited in their yellow ponchos to shuffle out of the stadium, cheerfully signing along as ''Who'll Stop The Rain'' by Credence Clearwater Revival pumped through the speakers.

''I wish it was a little cleaner. But, I mean, to send the seniors out with a win, you can't ask for anything more,'' Iowa defensive lineman Anthony Nelson said.

Martinez threw for 260 yards and two TDs to lead Nebraska (4-8, 3-6), which went 0-5 on the road in 2018. The Huskers played without injured star wide receiver J.D. Spielman for the second week in a row.

THE TAKEAWAY

Iowa: After a three-game losing streak robbed them of a shot at the Big Ten title, the Hawkeyes finished on a high note and will now await their bowl fate. It wouldn't be surprising to see them end up in either the Holiday or the Citrus Bowl.

Nebraska: When this rivalry was renewed back in 2011, who would have thought that it'd be Nebraska that couldn't keep up? The Huskers were expected to be on near-equal footing with Ohio State and Michigan by now, but they head into the offseason looking up at the likes of Iowa and Northwestern. Nebraska showed significant progress over the second half of the season though, and Martinez is a keeper. ''I have some fighters in there, and we need fighters,'' Frost said. ''The result isn't what we wanted, but I'm awfully proud.''

THE NUMBERS

Stanley finished with 152 yards passing and two touchdowns, and Iowa ran for a season-best 266 yards. ...Martinez also ran for 76 yards. Devine Ozigbo had 50 yards on just 10 attempts. ...Maurice Washington had 102 yards receiving and a 28-yard TD grab to pull Nebraska within 28-20. ...Hawkeyes fans know how Nebraska fans feel. In 2014, the Huskers' last win in the series, Iowa blew a 17-point lead and lost in overtime 37-34.

HE SAID IT

''Imagine getting second guessed. That really happens?'' Ferentz said.

---

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.