Baltimore earned a spot in the post-season Sunday, rallying to defeat the Cleveland Browns 20-10 while getting an assist halfway across the country.
Down 10-3 in the fourth quarter, the Ravens kicked a field goal and then took the lead on a 16-yard touchdown pass from Joe Flacco to Torrey Smith with 7:33 left.
Flacco's 2-yard TD throw to Kamar Aiken with 3:44 remaining clinched it.
To reach the playoffs for the sixth time in seven years, Baltimore (10-6) needed to beat the Browns (7-9) and have San Diego lose in Kansas City.
That is precisely what happened.
The first part of that equation seemed easy enough, given that the Browns had lost four straight, were starting rookie quarterback Connor Shaw and had dropped 12 of their past 13 against Baltimore.
The Ravens prevailed, and the Chiefs completed Baltimore's dream scenario with a 19-7 win.
For three quarters, the Ravens struggled offensively — just as they did one week earlier in a 25-13 loss in Houston. As the game wore on, the home fans showed their dissatisfaction by booing before yet another Baltimore punt.
But Flacco went 8 for 9 for 161 yards and two touchdowns during a 17-point fourth quarter. He finished 22 for 36 for 312 yards, and the two TD passes gave him a career-high 27 for the season.
Justin Forsett had 119 yards rushing for the Ravens, who will open on the road next weekend.
With quarterbacks Brian Hoyer and Johnny Manziel out with injuries, Shaw made his NFL debut for Cleveland. The Browns were also without suspended wide receiver Josh Gordon, and they placed cornerback Justin Gilbert on the inactive list after the rookie reportedly showed up late for a team meeting.
But someone forgot to inform Cleveland it had no business hanging with a team playing with a post-season berth on the line.
The Browns took a 10-3 lead in the third quarter when Shaw went 3 for 3 during an 80-yard drive. Shaw scrambled in the pocket before connecting on a 49-yard completion to rookie Taylor Gabriel, who started in place of Gordon. That was followed by a 2-yard touchdown run by Terrance West.
Baltimore closed to 10-6 with 10:37 left when Justin Tucker kicked a 28-yard field goal after a 39-yard completion from Flacco to tight end Owen Daniels.
Cleveland followed with three straight runs and a punt, giving the Ravens the ball again with 8:23 to go.
Flacco completed a 53-yarder to Smith before hitting the wide receiver in the middle of the end zone for the go-ahead score.
West ran for 94 yards and Shaw went 14 for 28 for 177 yards, but the Browns finished the season with five straight losses and serious off-the-field issues that must be resolved.
There were more fumbles (three) than scoring plays in a first half that ended tied at 3.
Shaw launched his professional career by moving the Browns to the Baltimore 25 before fumbling a snap and losing the ball.
Baltimore didn't fare much better. After going three-and-out in their first two possessions, the Ravens got a first-and-goal at the Cleveland 2.
From there, two runs by Bernard Pierce, an incomplete pass and a run by Forsett failed to get the ball into the end zone.
A 25-yard field goal by Tucker made it 3-0 midway through the second quarter.
West then peeled off a 36-yard run — Cleveland's longest of the season — and the Browns converted a fourth-and-2 before Garrett Hartley tied it with a 38-yard field goal.
Online: AP NFL website: www.pro32.ap.org and www.twitter.com/AP_NFLSuggest a correction