The Detroit Lions have a win. And a quarterback?

The Lions ended their winless season under rookie coach Marty Mornhinweg as rookie quarterback Mike McMahon overshadowed a brilliant second-half performance by Randy Moss in a 27-24 victory over the Minnesota Vikings.

Cory Schlesinger scored on a one-yard run with 10:36 left as Detroit (1-12) avoided the NFL's first 0-13 start since the 1986 Indianapolis Colts.

Detroit Lions fullback Corey Schlesinger (30) is dragged down by Minnesota Vikings' Ed McDaniel, left, Sunday. (AP PHOTO)
Detroit Lions fullback Corey Schlesinger (30) is dragged down by Minnesota Vikings' Ed McDaniel, left, Sunday. (AP PHOTO)

The game came down to the final seconds, which is no surprise when it comes to the Lions, who had lost each of their previous three games and seven this season by five points or fewer.

Minnesota (5-8) drove inside Detroit territory in the final seconds but dropped to 0-6 on the road and moved closer to elimination after reaching the NFC championship game last season.

Starting for just the second time, McMahon threw for 226 yards, rushed for another 75 and a touchdown and was a major reason why Detroit snapped a 13-game losing streak, dating to 2000.

A quick-footed Rutgers product playing for an injured Charlie Batch, McMahon ran when necessary and threw accurately, completing 15-of-28 passes.

He did most of his damage in the first half but led a 13-play, 80-yard drive that resulted in Schlesinger's TD and a 27-24 lead with 8:45 to play.

McMahon converted three third downs on the drive, including a 3rd-and-24 from Detroit's 6-yard line. He also scrambled for four yards on 3rd-and-4 from Minnesota's 6.

The late drive offset an amazing display by Moss, who had seven catches for 144 yards and a pair of touchdowns as the Vikings erased a 20-7 halftime deficit.