MIAMI GARDENS, Fla. -- Down by 10 points in the second quarter, their playoff chances fading, the Baltimore Ravens finally picked up a first down.
After that, the Miami Dolphins couldn't stop them.
The Ravens mounted a comeback with consecutive touchdown drives of 97 and 75 yards, then added the clinching score after a favorable replay reversal to beat Miami 28-13 Sunday.
A gamble by coach John Harbaugh in the third quarter helped. The Ravens made a first down on fourth-and-1 in their own territory, jump-starting the TD drive that put them ahead.
The victory gave Baltimore (8-5) a significant edge over Miami (7-6) in the AFC's tight scramble for a wild-card playoff berth. The Ravens also tightened the race for AFC North title, helped by a loss by first-place Cincinnati (8-4-1).
The Dolphins, who haven't been to the postseason since 2008, are now a long shot with three games to go.
The Ravens played 17 minutes before they made a first down, but finished with 26 first downs and 447 yards. They outgained Miami 425-161 in the final three periods.
Elvis Dumervil led Baltimore's defensive charge with 3½ sacks. Ryan Tannehill threw for 227 yards and a score, but was sacked six times. And the Dolphins totaled only 249 yards.
The Ravens' Joe Flacco went 25 for 33 for 269 yards and two touchdowns, and overcame an interception in the end zone. He also ran for a score.
Flacco and Harbaugh improved to 5-0 against the Dolphins, including four wins in Miami.
Leading 14-13, the Ravens were helped by a replay reversal midway through the fourth quarter. Flacco fumbled attempting to throw and Miami recovered, but a review determined his arm was moving forward when he lost the ball, and the play was ruled an incomplete pass.
On the next play, Justin Forsett scored on a 2-yard run.
The Ravens went three-and-out on their first three possessions, but drove the length of the field in the final 3:08 of the first half, capped by Flacco's 1-yard pass to Steve Smith on third down with two seconds left. That cut their deficit to 10-7.
When the Ravens went for a first down on fourth-and-1 at their 34 in the third quarter, Flacco gained 2 yards on a sneak. Flacco went on to hit Kamar Aiken with a 13-yard pass for the score and the lead.
Miami was up 10-0 in the second quarter when a long completion and scoring threat were negated by a penalty on guard Mike Pouncey for being downfield on the play. That infraction seemed to deflate the Dolphins.
Trailing 14-10, they had a first down at the Baltimore 4 early in the fourth quarter. Tannehill missed an open Mike Wallace in the end zone and was then sacked by C.J. Mosley on third down, forcing Miami to settle for a field goal.