DETROIT (AP) Kirk Cousins danced in the end zone after running for a go-ahead touchdown early in the fourth quarter and the Minnesota Vikings went on to celebrate the end of a disappointing season with a 37-35 win over the lowly Detroit Lions on Sunday.

''We were really close to being in the playoffs,'' Cousins said after throwing three touchdowns in the first half and finishing with a season-high 405 yards passing.

The Vikings (7-9) failed for the fourth time in a decade to make two straight trips to the playoffs. They won five of six midway through the season to be in the postseason race, but dashed those hopes by losing three straight before closing with a win at Detroit.

The Lions (5-11) lost their last four games and eight of 10 after going into November with a .500 record under former coach Matt Patricia.

Detroit's defense broke franchise records by allowing 519 points and 6,716 yards, breaking marks set by its winless team in 2008 and ranking among the worst in NFL history.

''The defense, somebody else is probably going to be looking at it,'' said Lions interim coach Darrell Bevell, who had one victory in five games and missed a game because of COVID-19 protocols in place of Patricia.

The unit's woes were on full display when Chad Beebe scored on a 40-yard touchdown with 4 seconds left in the first half. The receiver bounced off two defenders and ran past veteran safety Duron Harmon as he stood and watched.

''Can't go for those kill shots or think someone else is going to make the play,'' Bevell said.

In a matchup without postseason implications, the Vikings and Lions combined to play a closely contested game with a lot of highlights and lowlights.

Alexander Mattison ran for 16 yards to convert a fourth-and-1 from the Lions 25 with 2:28 left, allowing the Vikings to run out the clock to seal the win. The second-year running back ran for 95 yards and a third-quarter touchdown. He also turned a short pass on fourth down into a 28-yard score in the first quarter.

Mattison filled in for running back Dalvin Cook, who missed the game following the death of his father.

Cousins was 28 of 40 and didn't throw an interception, finishing with his highest total of yards passing since Sept. 27, 2018.

Justin Jefferson had nine receptions for 133 yards to finish with 1,379 yards receiving, breaking the NFL rookie record for yards receiving set by Anquan Boldin in 2003.

''He's a great weapon to have and should be for many years,'' coach Mike Zimmer said.

Detroit's Matthew Stafford - playing with ankle, rib and thumb injuries - was 20 of 31 for 293 yards with three touchdowns. In possibly his last game with the Lions, he threw an interception that led to Dan Bailey's field goal that put the Vikings ahead 31-23 in the third quarter.

''I got two years left on my deal here,'' said Stafford, declining to speculate about the possibility of playing elsewhere next season.

Marvin Jones had eight receptions for 180 yards and two touchdowns for the the Lions.

TOUGH CALL

Cousins' 1-yard run early in the fourth quarter came two plays after a questionable call was made against defensive back Tracy Walker. He was flagged for roughing the passer on his sack, giving Minnesota a first down at the Detroit 1 instead of turning it over on downs.

''It's one of the worst calls I've ever seen in the game of football,'' said Detroit running back Adrian Peterson, who had a season-high 38-yard run and finished with 63 yards and a touchdown on seven carries against the team that drafted him in 2007. ''That's such a critical situation and it changed the entire game.''

Referee Adrian Hill said Walker was flagged because he landed on Cousins with all of his weight.

Cousins, though, acknowledged the Vikings probably got a break.

''I said to the player who tackled me, `I don't necessarily agree with that call, but I'll take it,'' he said.

INJURY REPORT

Vikings: Four injured starters on defense were inactive, including linebacker Eric Kendricks.

Lions: OT Halapoulivaati Vaitai and OG Jonah Jackson left the game with concussions.

UP NEXT

The Vikings will pick in the top half of the first round for the first time since 2015, when they picked cornerback Trae Waynes at 11th overall. They have significant needs on the defensive line and to a lesser extent the offensive line.

The Lions have been looking for a new general manager and evaluating potential coaching candidates since firing Bob Quinn and Patricia in November. The searches should kick up a notch now that the regular season is over.

---

Follow Larry Lage at https://twitter.com/larrylage

---

More AP NFL: https://apnews.com/NFL and https://twitter.com/AP-NFL

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.