AP photo by John Bazemore / Atlanta Falcons wide receiver Russell Gage leaps but is unable to make the catch over Denver Broncos defensive back Essang Bassey during the second half of Sunday's game in Atlanta.

ATLANTA — Little by little, the Atlanta Falcons are learning how to win while still leaving room for too much late-game drama.

Matt Ryan took advantage of a thin secondary to throw three touchdown passes, and the Falcons turned back the Denver Broncos' bid for a second consecutive comeback, handing the visitors a 34-27 loss Sunday at Mercedes-Benz Stadium.

Ryan was 25-of-35 passing for 284 yards with one interception as Atlanta (3-6) improved to 3-1 under interim coach Raheem Morris. It's a significant turnaround for a team that fired coach Dan Quinn and general manager Thomas Dimitroff after an 0-5 start.

"It kind of feels good with back-to-back wins for the first time this season," Falcons running back Todd Gurley said. "I'm just happy, man. Happy for everybody. We get to be excited."

However, the fourth-quarter comeback attempt by the Broncos (3-5) gave Atlanta, which led 20-3 at halftime, a scary reminder of blown leads this season.

"I think we've got a few things we've got to clean up, a few things we can do better ... so we can close these games out a little quicker," Ryan said.

some text
FILE - AP photo by John Bazemore / Atlanta Falcons quarterback Matt Ryan threw three touchdown passes to lead the team to a 34-27 win against the visiting Denver Broncos on Sunday. The Falcons have won three of their past four games since starting 0-5.

Broncos quarterback Drew Lock, a second-year pro, threw two touchdown passes and ran for a 10-yard score in the final quarter to pull his team within the final margin.

"I'll never admit to it not being our day on offense because of how confident I am in our guys," Lock said. "It's got to be something. We're going to go back and watch it, brainstorm and figure it out."

One week after throwing three fourth-quarter touchdown passes to lead Denver to a 31-30 comeback win over the Los Angeles Chargers, Lock tried to spark another rally.

With Atlanta leading 27-6, he threw a 20-yard touchdown pass to Jerry Jeudy early in the fourth. On Denver's next possession, Lock was under pressure from Grady Jarrett when he overthrew Jeudy and was intercepted by Ricardo Allen, who returned the ball 20 yards to the Denver 12.

"I promise, I will throw that ball 10 times out of 10 to Jerry on that pick," Lock said. "I tried to backpedal, and that's a throw ... I should make. We'll get them next time."

Gurley's 4-yard touchdown run extended Atlanta's lead to 34-13. Lock answered with a 9-yard touchdown pass to Tim Patrick with less than four minutes remaining, and the quarterback's run to the end zone with less than two minutes remaining added serious weight to the rally.

The Broncos took the ball at their 20 with 44 seconds remaining and no timeouts, needing a touchdown and extra-point kick to tie.

"I wasn't nervous at all," said Atlanta's Morris, before adding with a laugh, "Good thing I had that mask on."

After three incompletions by Lock, a fumbled snap ended the possession.

"We have to be better in the first three quarters," said Lock, who was 25-of-48 for 313 yards despite not having an effective running game to balance the offense. Lock was the team's leading rusher with 47 yards on seven carries; Phillip Lindsay added 23 yards on eight runs.

The Falcons scored on their first four possessions, thriving on Ryan's ability to find holes in the Broncos' depleted secondary. Injuries kept out starting cornerbacks A.J. Bouye (concussion) and Bryce Callahan (ankle).

Atlanta converted six of seven third downs in the first half. The Falcons showed off their depth at wide receiver, overcoming the absence of Calvin Ridley, who was held out with a mid-foot sprain. Olamide Zaccheaus and Brandon Powell had touchdown catches to complement top threat Julio Jones, whose 21-yard reception in the third quarter helped Atlanta go up by 21 points for the first time.

Even after not practicing all week, Ridley tried to talk his way into the game during warmups. He injured his left foot in Atlanta's Oct. 29 road win against the Carolina Panthers.

"He was in my ear pregame," Morris said. "He's always going to want to play. Sometimes you have to protect guys from themselves, and that's what we did today with him."

Zaccheaus beat Davontae Harris in the first quarter for a 51-yard touchdown catch — this first this season — even though Harris was called for interference.

Zaccheaus added a 42-yard catch in the second quarter to set up Ryan's 9-yard touchdown pass to Powell. It was the first NFL touchdown for Powell, Atlanta's top return specialist.

Atlanta has an open date before visiting the New Orleans Saints on Nov. 22.