Dan Bailey kicked a game-winning, 23-yard field goal with 1:49 remaining in overtime and Kirk Cousins passed for 305 yards and three touchdowns as the host Minnesota Vikings defeated the reeling Jacksonville Jaguars, 27-24, on Sunday for their fifth win in six games.

Jaguars quarterback Mike Glennon threw two interceptions, fumbled and was sacked in the end zone for a safety in Jacksonville’s franchise-record 11th straight loss. Vikings safety Harrison Smith snagged Glennon’s second interception inside Jaguars territory to set up Bailey’s game-winning kick.

Justin Jefferson had nine catches for 121 yards and a touchdown for the Vikings, who outgained the Jaguars 420-390. Dalvin Cook overcame a slow start to finish with 32 carries for 120 yards.

Minnesota (6-6) remained in the NFC playoff hunt by regrouping after the Jaguars took a 16-6 lead early in the third quarter, their largest advantage of the season. The Vikings scored 18 consecutive points to take a 24-16 lead with 3:50 to go, but the Jaguars (1-11) rallied to tie the game with 1:08 to go on James Robinson’s 1-yard touchdown run and two-point conversion pass from Glennon to Collin Johnson.

Moments after Bailey missed a 51-yard field goal that would have put Minnesota ahead with 13 seconds to go, Jaguars placekicker Chase McLaughlin, who was on the Vikings’ practice squad this season, was short on a 62-yard field-goal attempt as time expired, sending the game to overtime.

Cousins was 28-of-43 passing for 305 yards, three touchdowns, one interception and a lost fumble. Glennon was 28-of-42 passing for 280 yards, a touchdown and two interceptions, while Robinson had 18 carries for 78 yards and a touchdown.

Jacksonville added quickly to its three-point halftime lead, as linebacker Joe Schobert snagged a Cousins screen pass and raced 43 yards down the right sideline for a touchdown with 14:50 remaining in the third quarter. It marked the second successive week the Vikings have allowed a defensive touchdown on the first play of the second half.