DETROIT – As soon as he turned his head, Adam Thielen knew there'd be trouble.

The Vikings defense had just allowed Matthew Stafford and the Detroit Lions to escape from their 1-yard line and boot the game-tying field goal. Now their offense, sporadic again on Thursday, was attempting to piece together a late-game scoring drive in the hopes of avoiding another overtime session with their division rivals.

Even after an illegal-formation penalty on receiver Cordarrelle Patterson wiped out a chain-moving catch by running back Jerick McKinnon, the Vikings opted to attack on third-and-7 with 38 seconds left, instead of waving a white flag on the drive.

Thielen, their shifty route-runner who had already caught eight passes, sprinted up the field before swerving toward the right sideline — and right into the Lions' trap.

Lions cornerback Darius Slay was lurking in wait and jumped in front of Thielen to intercept quarterback Sam Bradford and return the pick to the Vikings 20-yard line.

In an instant, with clutch Lions kicker Matt Prater's game-winning field goal more or less a formality, Slay and the Lions had seized control of the NFC North. Prater split the uprights from 40 yards out to make the Vikings' 16-13 loss at Ford Field official.

"A heartbreaker like that," left guard Alex Boone said, "believe me, it hurts."

It was the latest comeback win for the Lions and their quarterback, Stafford, who rallied them from three points down with five minutes left to stun the Vikings again.

After Kai Forbath made a fourth-quarter field goal to give the Vikings their first lead at 13-10, the Lions started their game-tying drive just outside of their 1-yard line. Slot receiver Anquan Boldin beat cornerback Captain Munnerlyn for 29 yards on third-and-8. Stafford later connected with Boldin again to get into field-goal range.

"They just made plays when it counted towards the end," Munnerlyn said.

The Vikings got the ball back with 1 minute, 45 seconds left and trusted Bradford, who has been so steady this season despite porous pass blocking and little help from the NFL's worst rushing attack, to put Forbath in position to kick a game-winner.

A swing pass to McKinnon got the Vikings to their 40-yard line, but the play did not stand because Patterson was flagged for not lining up on the line of scrimmage. That put them in third-and-long, a situation for which the Lions had saved something special.

Starting out in the slot, Thielen ran an out route toward the right sideline. But Slay, the cornerback who gave the impression he was covering rookie wideout Laquon Treadwell man to man on the outside, peeled off and dropped into zone coverage.

"They played a different coverage than we had been getting all game," Thielen said.

Bradford did not anticipate Slay factoring into Thielen's route and let the pass rip. Bradford later said he believed that was the first time the Lions showed that look.

"They trapped it and, yeah, he just made a good play," said Bradford, who completed 31 of his 37 attempts for 224 yards with no touchdowns and that one interception.

Slay coughed up the ball at the end of his interception return, but an official review confirmed the call on the field, which was that Slay was down before fumbling.

After the game, Slay said he wasn't surprised the Vikings threw it on that decisive play.

"They didn't want to go to overtime. They knew what happened that last time we went to overtime," said Slay, referring to the team's last meeting on Nov. 6.

In that 22-16 overtime loss, the Vikings took a three-point lead with 23 seconds left, then let Stafford move the Lions into position for a 58-yard field goal by Prater. Stafford then threw a 28-yard touchdown pass to wide receiver Golden Tate early in overtime.

That stunner, coupled with this tough loss on Thanksgiving Day, put the 7-4 Lions a game ahead of the 6-5 Vikings in the NFC North while also giving them the tiebreaker.

"Tough one to lose today," coach Mike Zimmer said in a major understatement.

The Lions scored on the game's opening drive, with Stafford tossing a 2-yard touchdown pass to Boldin. The Vikings responded on their first drive with a 5-yard rushing touchdown by Matt Asiata. The Lions took a 10-7 lead into halftime. But a pair of field goals by Forbath gave the Vikings their first lead of the game, 13-10, early in the fourth quarter.

The offense's struggles on third down and the defense's inability to keep Stafford in the pocket kept the game close, setting up Bradford's back-breaking interception.

That gaffe seriously dented the team's playoff odds. But the Vikings still have hope.

"We're going to need some help now, but everything is still in front of us," linebacker Chad Greenway said. "If we win, good things will happen. … Hey, we're a good football team. We've just got to figure out how to win these games."

Matt Vensel covers the Vikings for the Star Tribune. matt.vensel@startribune.com