DENTON, Texas (AP) -- Jamario Thomas ran for three second-half touchdowns to help North Texas rally for a 27-26 victory over Western Kentucky on Saturday.
The Hilltoppers (7-5) had a chance to win with a minute to play, but Chris James' 38-yard field goal attempt fell short after a high snap.
WKU took leads of 14-0 and 20-7 in the second quarter but fumbled the second-half kickoff. Deavin Cox recovered for UNT (2-9). Three plays later, Thomas ran 8 yards for his first score.
Thomas' second touchdown, with 4:24 remaining in the third quarter, pulled the Mean Green within two at 23-21.
UNT's defense, which allowed 47 points per game in its first 10 contests, held Western Kentucky to James field goals of 26 and 44 yards in the second half.
The second of those field goals put WKU ahead 26-21 with 9:50 to play. North Texas came back with a six-play, 76-yard drive. Thomas went the final 42 yards to put the Mean Green ahead for the first time. He also ran for a first down that allowed UNT to run out the clock. Thomas finished with 147 yards in 16 carries.
The Hilltoppers knocked down a pass attempt for a 2-point conversion. They drove 41 yards to the UNT 21 before James' second miss of the game.
Two of Western Kentucky's three interceptions of Giovanni Vizza led to touchdowns.
Rashad Etheridge's 52-yard return set up Tyrell Hayden's 23-yard scoring run in the first quarter, and defensive end Terald Clark returned an interception for a touchdown 28 seconds before halftime. An unsportsmanlike conduct penalty pushed the extra-point attempt back 15 yards, and James missed the kick.
Quarterback David Wolke ran 10 yards for WKU's other touchdown in the second quarter.
North Texas moved within 14-7 when it blocked a punt and Chris Neal ran 5 yards for a touchdown.
Casey Fitzgerald's eight receptions increased his UNT record to 104 with one game to play.