As encouraging as this season has been for the Miami Dolphins, their record could be even better — and this latest loss to Detroit is one that might haunt them down the stretch.

Matthew Stafford threw an 11-yard touchdown pass to Theo Riddick with 29 seconds remaining to lift the Lions to a 20-16 win over the Dolphins on Sunday. It was the second time in the past month that Miami lost a game on a touchdown in the final minute. Green Bay scored one with 3 seconds remaining to beat the Dolphins on Oct. 12.

"In the huddle I just kept trying to tell the offense, 'We've got to kill this game,'" Dolphins receiver Make Wallace said. "It's a tough loss, but we've got a lot of games ahead. We've still got seven more games, we've got to stay positive."

Calvin Johnson had seven catches for 113 yards and a touchdown in his first game back from an ankle injury, and the Lions (7-2) won their fourth straight game. Detroit's past three victories have been by a combined six points, all with fourth-quarter comebacks.

The Dolphins (5-4) managed one touchdown after they blocked a Detroit field goal attempt and returned it deep into Lions territory. Miami's Ryan Tannehill threw for 201 yards, but it was Stafford who made the final big play, snapping a pass to a sliding Riddick in the back left corner of the end zone.

"I just love that feeling. It's a good feeling for a quarterback to have the ball in his hands at the end of the game," Stafford said. "By no means are we playing perfect, but we're finding ways to win games."

The Dolphins have made the playoffs only once in the past 12 seasons, and a victory in Detroit would have been big. Miami took a 16-13 lead with 4:19 remaining on a 20-yard field goal by Caleb Sturgis. It was the second time the Dolphins settled for three points near the Detroit goal line.

The Lions had to punt, but they forced Miami to do the same, and Stafford still had 3:13 left when Detroit took over on its 26.

Stafford completed his first five passes of the drive before two incompletions set up third down from the Miami 27. Stafford found Golden Tate for a completion ruled a first down, bringing the Lions even closer to the end zone.

Finally, on third down from the 11, Stafford scrambled a bit to his left and threw to Riddick, the 5-foot-9 running back who slipped behind Reshad Jones in the end zone.

"I think Detroit certainly earned the victory," Dolphins coach Joe Philbin said. "I felt it was a team loss. It's easy to say it's on the defense because they scored with 30 seconds to go, but obviously we had the ball on offense and an opportunity to run the clock out and get first downs. We didn't do it."

Detroit squandered an early 10-0 lead and fell behind after yet another kicking mishap. Ahead 10-6 in the third quarter, Matt Prater's 42-yard attempt was blocked by Earl Mitchell. Dion Jordan's 58-yard return put the ball at the Detroit 3. Tannehill threw a 3-yard touchdown pass to Mike Wallace.

It was the second blocked field goal of the season for Miami, which has also blocked two punts.

Prater made a 50-yard kick early in the fourth quarter, but the Lions are still only 11 of 22 on field goals this season. They won their previous game over Atlanta on Prater's last-second kick in London — but that came after a miss was negated by a delay of game penalty on Detroit.

The Lions outgained Miami 121-1 in building their early lead. Then the game quickly turned into the type of low-scoring struggle expected between the top-ranked defense in each conference. Detroit's early touchdown came when Stafford found Johnson deep over the middle in single coverage. With a 7-inch height advantage over Brent Grimes, Johnson hauled in the pass in for a 49-yard score while Grimes tumbled to the ground behind him.

Detroit had a great chance to add to the lead in the second quarter after James Ihedigbo intercepted Tannehill and returned it deep into Miami territory. But a facemask penalty pushed the ball back to the Miami 31, and on the next play, Stafford threw toward Johnson. Grimes made a spectacular interception, reaching up with his right hand and pulling the ball in as he fell backward into the end zone.

NOTES: Detroit ran two fake punts in the first half. Punter Sam Martin completed passes on both, but only one was long enough for a first down. ... Detroit OL Larry Warford hurt his left knee early in the game. ... Miami's Lamar Miller was held to 10 yards on four carries.


AP NFL website: www.pro32.ap.org and www.twitter.com/AP_NFL