AP photo by Wilfredo Lee / Atlanta Falcons quarterback Matt Ryan passed for 336 yards and two touchdowns and led the team on a late drive to set up the winning field goal against the host Miami Dolphins on Sunday.

MIAMI GARDENS, Fla. — Matt Ryan fell asleep during Game 6 of the National League Championship Series, and he wasn't even aware until waking up Sunday morning that the Atlanta Braves are heading to the World Series.

The Braves, he noted, are playing for a title despite struggling on the baseball field for much of the year.

And he sees no reason why such a turnaround can't inspire the Atlanta Falcons.

Ryan had two big throws to Kyle Pitts to get Atlanta into field-goal range on the final drive, Younghoe Koo made a 36-yarder as time expired, and the Falcons beat the Miami Dolphins 30-28 on Sunday — a sixth consecutive loss for Miami, and the second in a row coming on a kick on the final play.

"You have the right mindset and have courage," Falcons first-year head coach Arthur Smith said of Ryan, the quarterback who has spent all 14 of his NFL seasons in Atlanta. "He has it. He's a special player. I personally think he's been criminally underrated, if you look at his career."

Ryan passed for 336 yards, 163 of them to Pitts, his rookie tight end. The Falcons (3-3) had blown a 13-point fourth-quarter lead and were trailing with 2:27 left, but Ryan and Pitts needed only 37 seconds to flip the momentum.

A 23-yard pass to Pitts opened the final drive, a 28-yarder down the sideline got Atlanta well within Koo's range, and Ryan then milked the clock down to almost nothing with Miami (1-6) out of timeouts and resigned to simply hoping for a miracle miss.

"We had plenty of time," Ryan said. "We just needed a field goal. I know we have a guy who can put it between the pipes."

Ryan completed 25 of 40 passes, with touchdowns to Russell Gage and Calvin Ridley.

some text
AP photo by Hans Deryk / Atlanta Falcons wide receiver Russell Gage (14) celebrates after scoring a touchdown during the second half of Sunday's game against the Miami Dolphins.

Miami's Tua Tagovailoa was 32-of-40 passing for 291 yards and a career-high four touchdowns, the last of them going to Mack Hollins with 2:27 left, but he also threw two interceptions — both of which led to Atlanta scores.

"The margin for error is slim in this league," Tagovailoa said.

Isaiah Ford, Myles Gaskin and Mike Gesicki had the other touchdown receptions for the Dolphins, who were down by six early in the fourth quarter when Xavien Howard stripped a catch from Ridley, then corralled the ball on his left hip for an interception as he fell to the turf. That gave Miami the ball on the Atlanta 32 and a chance to regain the lead.

But on the ensuing play, Tagovailoa tried to force the ball to Jaylen Waddle, and Falcons linebacker Foyesade Oluokun made an easy interception and returned the ball 56 yards to the Miami 14. Three plays later, Cordarrelle Patterson ran in from the 3, and the Falcons were up 27-14.

"It wasn't perfect," Ryan said. "The idea is to get the job done, and we did that."

Tagovailoa's 7-yard pass to Gaskin made it a one-score game again, capping a 90-yard drive. After another Atlanta turnover midway through the fourth, Tagovailoa found Hollins to give the Dolphins the lead.

They just couldn't hold it.

Miami led 7-0 early after Tagovailoa led a nearly perfect opening drive. The Falcons scored the next 20 points, aided by a bad interception from Tagovailoa on a pass into the end zone late in the half.

A three-play, 77-yard drive to open the second half was capped by a 49-yard touchdown pass from Ryan to Gage, and Patterson's touchdown run made it 27-14. Tagovailoa got Miami the lead, then had to watch Ryan take it away at the end.

"He put us in position to win the game, which at the end of the day is all you can ask for from the quarterback," Dolphins coach Brian Flores said.

Atlanta's 20 consecutive points — going from down 7-0 to up 20-7 — marked the fifth time in the last six games that Miami gave up at least that many points without scoring.

"What we've got to do is continue to work," Tagovailoa said. "I don't see any other way that you look at that. I don't think there's a secret recipe for wins."