BOWLING GREEN, Ky. — The University of Maine trailed by three touchdowns after five minutes Saturday night, then scored 31 unanswered points and held on to defeat Western Kentucky 31-28 at Houchens-Smith Stadium.

The Black Bears blocked Western Kentucky’s 48-yard field-goal attempt to tie the game with 47 seconds left, preserving the program’s third-ever victory against an FBS program, following wins at Mississippi State in 2004 and Massachusetts in 2013.

Chris Ferguson threw for 185 yards and three touchdowns, his third going to Micah Wright to take a 28-21 lead with 5:16 left in the third quarter.

Maine (2-0) held Western Kentucky (0-2) to 12 straight scoreless drives after falling behind 21-0 early.

The Black Bears trimmed the deficit to 21-14 by halftime, then tied it in the third quarter on Deshawn Stevens’ 50-yard fumble return for a touchdown.

Maine made Western Kentucky pay for attempting a fourth-and-1 at its own 15, forcing a stop and scoring on the next play. Ferguson threw his second TD pass of the night to Wright to give the Black Bears the lead for good.

Maine made it 31-21 on Kenny Doak’s field goal midway through the fourth quarter.

The victory gives the Black Bears momentum heading into a bye week before traveling to face a second FBS team, Central Michigan, on Sept. 22.

Sterling Sheffield led a Maine defense that recorded six sacks and seven tackles for loss. Sheffield had 12 tackles and forced the fumble that led to Stevens’ tying score.

“Being down 21-0, (Ferguson) came up to me and said, ‘Hey, we’re going to win this game,’” Sheffield said. “I believed him the whole time. It’s great. We’ll be able to enjoy it for a few days and come back and play another FBS opponent in Central Michigan.”

NOTES: Joe Harasymiak is now 12-11 in his third season as Maine’s head coach. … Maine received $300,000 for playing at Western Kentucky. … The Black Bears are now 3-0 against Conference USA schools. … Through two games, Maine has outscored opponents 36-0 in the second quarter. … The Black Bears will receive $400,000 from Central Michigan. Harasymiak has said playing FBS opponents “is something this program has to do.”