LARAMIE, Wyo. (AP) Josh Allen eluded three would-be tacklers on a wild touchdown scramble from 7 yards out in the third overtime to lift Wyoming to a 40-34 win over Northern Illinois in a game that began nearly two hours late Saturday night due to thunderstorms and ended early Sunday morning.

Christian Hagan missed a 38-yard field goal wide left at the start of the third overtime for Northern Illinois (0-1).

Brian Hill finished with 125 yards rushing and two touchdowns, including a 5-yarder in the second overtime for Wyoming (1-0). Drew Hare's 1-yard scoring run for Northern Illinois forced a third overtime.

More from FoxSports

At the start of the first overtime, Hare fumbled on 3rd and goal from the 2 and Wyoming's Logan Wilson recovered.

Allen's 2-yard scoring toss to Jacob Hollister snapped a 20-all tie late in the third quarter, but Hare led the Huskies on a 77-yard drive, converting a fourth-and-10 before hitting wide-open Shane Wimann for a 19-yard touchdown with 1:13 left in the regulation.

Wyoming freshman Cooper Rothe missed a 48-yard field goal at the end of regulation and 37-yarder at the end of the first overtime.

Allen, in his second career start, finished 19 of 29 for 245 yards and two touchdowns. Hare was 24 of 39 for 329 yards with three touchdowns, and Kenny Golladay had 10 receptions for 144 yards and two scores for the Huskies.

The game was delayed one hour, 50 minutes by a series of thunderstorms. Kickoff didn't occur until 10:20 p.m. and the contest ended at 2:34 a.m.

THE TAKEAWAY

NORTHERN ILLINOIS:

Northern Illinois is the winningest team of the Mid-American Conference over the last decade, so last year's 8-6, injury-plagued campaign, capped by a fourth-straight bowl game loss, left the team hungry for a strong start to 2016 and return to form. The Huskies struggled against an inspired Cowboys team that was among the worst in the FBS last year, at least statistically. Hare appears to be fully recovered from a torn Achilles tendon that sidelined him for the final five games of last season, but his fumble at the end of the first overtime was costly.

WYOMING: The Cowboys won only six games in coach Craig Bohl's first two seasons, but this victory was a major step up for the beleaguered program. Bohl has vowed to restore the program ''the right way'' which might not be the fastest way, but his team made significant strides in the opener, being competitive throughout the whole game, which didn't occur very often last year. The defense looked much quicker and rose to the occasion at several key points, including shutting out the Huskies in two of the three overtimes.

UP NEXT

NORTHERN ILLINOIS: The Huskies visit South Florida, the fourth meeting between the schools. The Bulls won the last encounter 27-3 in the final International Bowl, played in Toronto following the 2009 campaign to lead the series 2-1.

WYOMING: The Cowboys travel to Nebraska, which leads the all-time series 7-0, including a 37-34 win in 2013's season opener in Lincoln. Wyoming racked up 602 yards against the No. 18 Cornhuskers and nearly overcame a late 16-point deficit.