– Aaron Rodgers took the shotgun snap on an untimed down with no time left, shuffled to his left, slipped a sack, rolled right and heaved a pass that seemed as high as it was long.

Richard Rodgers, drifting toward the end zone while teammates and opponents crowded behind him, leapt and made the catch on the 61-yard play to give the Green Bay Packers a stunning 27-23 victory that capped a comeback from 20 points down against the Detroit Lions on Thursday night.

"I knew I was going to have to buy some time to allow them to get into the end zone," said Aaron Rodgers, the two-time NFL MVP. "I knew once I got outside the right that I was going to be able to set up and throw."

The Packers got one more shot to win after Detroit defensive end Devin Taylor was called for grabbing Rodgers' facemask on a tackle on what would have been the last play of the game.

The Packers (8-4) had lost four of five and were in danger of potentially falling two games behind the Vikings in the NFC North race. Instead, they can regain a share of the division lead if the Vikings lose to Seattle on Sunday.

"Unfortunately, this counts as one win," Packers coach Mike McCarthy said. "It feels like more."

The Lions (4-8) had won three in a row and blew a chance to sweep the season series for the first time since 1991.

"Tough one to lose," Detroit coach Jim Caldwell said. "Those are the ones that eat at you. The guys are upset because they gave so much, but we needed one more play. It is never over in this league."

Matthew Stafford connected with Calvin Johnson on his second touchdown pass of the first quarter to help Detroit build a 20-point lead that it couldn't keep.

"Not an easy pill to swallow," said Stafford, who completed 23 of 35 passes for 220 yards and two touchdowns.

Rodgers, who finished 24-for-36 for 289 yards with two touchdown passes and an interception, also scored on a 17-yard run with 3 minutes, 4 seconds left, pulling the Packers within 23-21.

Stafford connected with TJ Jones to convert a third-and-12 from the Detroit 18-yard line after Green Bay called its final timeout with 2:54 to go. The Lions needed one more first down to seal the victory, but Green Bay forced them to punt and got the ball back on its own 21 with 23 seconds left.

Following two incompletions, including one in which Detroit appeared to get away with pass interference, Aaron Rodgers threw a pass to James Jones, who lateraled the ball to Richard Rodgers, who tossed it back to the quarterback with no one behind him to lateral it again to keep the play alive.

But Taylor grabbed Aaron Rodgers' facemask, giving the Packers another play.

"I wasn't able to get away from those guys, but luckily my facemask was grabbed," Rodgers said.

Said Caldwell, "Didn't think it was [a penalty], but that doesn't matter."

On the final play, Aaron Rodgers scrambled long enough to give his receivers time to sprint to the end zone. He planted his foot at about the Green Bay 36 and got the ball into the end zone, where his tight end found a way to get to it in front of a slew of players from both teams.

"All I saw was the dude catching the ball," Lions cornerback Darius Slay said. "Limited words. I don't know what to say. I'm just in shock mode."

The ball not only had the right distance but the height as well, enabling Richard Rodgers to time his leap just right.

"When you throw it with that arc, it gives guys a chance," Packers coach Mike McCarthy said. "Richard's the perfect guy for that type of situation."

Aaron Rodgers threw a perfect pass — but it wasn't something he was used to doing.

"I've never had a completed Hail Mary before," he said.

He had seen the Packers lose to a Hail Mary in a prime-time game, though: the infamous Fail Mary three years ago in Seattle, when replacement officials ruled that Golden Tate came down with a touchdown catch on the final play of the game as he battled Packers defensive back M.D. Jennings, giving the Seahawks a 14-12 victory. Tate now plays for the Lions.

"I'll say this, at least our guy really caught the ball," McCarthy said.