by Brett Martel, Associated Press

Matt Ryan’s last and longest of several deep completions spared the Atlanta Falcons from another infamous collapse.

Ryan hit Cordarrelle Patterson for a 64-yard gain with a minute left to set up Younghoe Koo’s 29-yard field goal as time expired, and Atlanta defeated mistake-prone New Orleans on Sunday after allowing the Saints to wipe out an 18-point, fourth-quarter deficit.

“We just like to give our fans a heart attack, just keep them on their toes to make sure they’re paying attention,” Patterson joked. “We wanted to put them away early, but it’s the Saints; they’ve got a great team over there. They fought till the end. We did a better job. We got the win, that’s all that matters.”

Ryan passed for 343 yards, connected twice with Olamide Zaccheaus for touchdowns, and the veteran quarterback also ran for a score on a bootleg as the Falcons (4-4) snapped the Saints’ three-game winning streak and prevented New Orleans (5-3) from moving into a tie with Tampa Bay (6-2) atop the NFC South.

“I felt good after that one,” Ryan said. “I was excited. We needed to make a play. We needed to win that game. I’m proud of the guys for getting the job done.”

Ryan’s second scoring pass gave the Falcons a 24-6 lead with 10:39 left in the fourth quarter. But the Saints rallied to briefly take the lead on Trevor Siemian’s 8-yard pass to Kenny Stills with 1:01 left.

New Orleans then missed a 2-point conversion try for the second time in the game, leaving the door open for the Falcons to win with a field goal.

“We got it going but it was too little, too late,” Siemian said. “You can’t spot a team that many scores. I knew there was a lot of time left and the game wasn’t over when we scored at the end. You were still holding your breath a little bit.”

The Falcons have seen their share of blown double-digit leads in recent years — none worse than a Super Bowl loss five seasons ago to the Patriots in overtime after leading 28-3.

The Falcons lost four fourth-quarter leads last season, when they also became the first team in NFL history to lose back-to-back games after leading by 15 or more in the fourth quarter.

And just last December, the Falcons fell to Tampa Bay after leading 24-7.

But against their historical rivals in New Orleans, the Falcons didn’t fold. Rather, Ryan pulled off his 41st career comeback.

Ryan needed just one play to burn the Saints’ defense for his fourth completion of more than 30 yards in the game — and his second long connection with Patterson. The versatile running back beat rookie Paulson Adebo down the right sideline to give him six catches for 126 yards on the day.

“That’s ‘Matty Ice,’” Patterson said. “He’s not nervous, he’s been doing this his whole career.”

Even with top Falcons receiver Calvin Ridley unavailable while addressing mental health issues, Ryan completed 23 of 30 passes without a turnover. Russell Gage caught seven passes for 64 yards, rookie tight end Kyle Pitts caught three for 62 yards and Zaccheaus caught three for 58 yards.

Saints coach Sean Payton started Siemian on the heels of Jameis Winston’s season-ending knee injury a week ago, and intermittently mixed in Taysom Hill behind center.

Siemian passed for 249 yards and two touchdowns without an interception, and Hill completed both of his passes for 33 yards. But both quarterbacks were hindered by a combination of penalties, dropped passes and protection breakdowns.

“They played better than us today,” Payton said of the Falcons. “We didn’t do the things that winning teams do consistently in our league, and we’ve got to get that corrected.”

James Vaughters’ blind-side sack and strip of Siemian set up Atlanta’s final TD after linebacker Steven Means recovered and returned the fumble 32 yards to the New Orleans 6.

But New Orleans rallied for three straight TDs in the final eight minutes, starting with Siemian’s 5-yard pass to Marquez Callaway and Alvin Kamara’s 2-yard scoring run with 4:35 to go.

The Saints failed on a 2-point try after Kamara’s touchdown, but New Orleans sacked Ryan for the first two times all game to force a punt and set up its late, go-ahead possession.

“You’d love to have a comfortable lead. Everybody wants to be comfortable,” Falcons first-year coach Arthur Smith said. “That’s not the NFL, not when you’re on the road playing a good team.

“Our mindset has been we’re going to finish games,” Smith added. “This shows more about their mental toughness.”