DUBLIN — Ryan Hilinski threw for 313 yards and two touchdowns to help Northwestern rally for a 31-28 victory over Nebraska in Saturday’s college football season opener in Ireland.

Northwestern handed the Cornhuskers their seventh consecutive loss going back to last season — with all seven loses coming by single digits — and added more pressure on embattled coach Scott Frost.

The Cornhuskers are the first major-conference team in the AP Poll Era, which goes back to 1936, to lose seven straight games by single digits, according to ESPN Stats & Information research.

The Wildcats (1-0, 1-0 Big Ten) finished with 527 yards and gained a measure of revenge after their humiliating 56-7 loss to the Huskers last October. Nebraska hasn’t won since then.

Nebraska (0-1, 0-1 Big Ten) was looking for a bounce-back season with a revamped offense following a 3-9 season, but the team and its many fans who made the trip overseas are headed home bitterly disappointed.

Quarterback Casey Thompson had a big game in his Huskers debut, throwing for 355 yards, but a fourth-quarter mistake was costly. Cameron Mitchell intercepted Thompson’s pass and returned it almost 40 yards. Six plays later, Evan Hull ran it in from the 4 to give the Wildcats a 31-28 lead. Hull finished with 22 carries for 119 yards.

Xander Mueller picked off a pass that bounced off receiver Wyatt Liewer‘s hands with 1 minute, 27 seconds to play as the Wildcats sealed the win.

Anthony Grant rushed for two third-quarter scores, including a 46-yarder to put the Huskers ahead 28-17. He ran it in from 3 yards on the previous drive to get Nebraska in front after the Wildcats went into halftime with a 17-14 lead. Grant had 19 carries for 101 yards.

The Huskers had built a 14-3 lead after Thompson threw a 32-yard touchdown pass to fellow transfer Isaiah Garcia-Castaneda and then punched it in from the 1 early in the second quarter. Garcia-Castaneda finished with 120 yards on four receptions.

But Hilinski capped a terrific first half by finding Donny Navarro III at the back of the end zone for a 6-yard scoring strike to give the Wildcats a 17-14 lead with 25 seconds left in the half.

Earlier, Hilinski hit a wide-open Raymond Niro III on a play-action pass for a 41-yard score.

After Niro’s touchdown, Nebraska was driving again when linebacker Greyson Metz ripped the ball from Garcia-Castaneda after a 24-yard completion to the Northwestern 11-yard line.

The Associated Press contributed to this report.