SANTA CLARA, Calif.— Matt Ryan teamed up with Julio Jones on a 5-yard pass that was ruled a touchdown after a replay reversal with 2 seconds left, sending the Atlanta Falcons past the playoff-bound San Francisco 49ers 29-22 on Sunday.

Jones was called short of the goal line with the Falcons trailing 22-17. But a replay showed the ball breaking the plane with the Jones in the air while being tackled by Jimmie Ward.

When things couldn’t get crazier, they did: On the final kickoff, Atlanta scored another touchdown when Olamide Zaccheaus came up with the ball as the 49ers were tossing it around in desperation.

The 49ers still clinched their first playoff berth since a 2013 run to the NFC championship game with the Rams’ loss at Dallas.

In an afternoon when Jimmy Garoppolo and the offense hardly shined, San Francisco’s other units did their best to hold off Ryan until the quarterback exhibited the poise of a former MVP in a dramatic final minute – or, make that 12 seconds.

Kyle Juszczyk recovered a fumble on the punt return team early in the fourth quarter then caught a 2-yard touchdown pass from Garoppolo two plays later as the 49ers (11-3) briefly gave themselves some room before failing to close it out.

Fill-in safety Marcell Harris broke up a pass in the end zone intended for Austin Hooper in the waning moments. Then with 8 seconds remaining, Hooper couldn’t keep hold of the ball in the end zone though the Falcons (5-9) were already celebrating an upset when the play went to a review and the catch overturned because the ball hit the ground.

They got one more chance, and made it count. Then Atlanta celebrated for real, leaving San Francisco’s players stunned.

TEXANS 24, TITANS 21: Visiting Houston grabbed control of the AFC South by beating Tennessee  as Ka’imi Fairbairn kicked a 29-yard field goal with 3:26 left for the winning points.

The Texans (9-5) nearly blew a 14-0 halftime lead. Deshaun Watson threw for 243 yards and two touchdowns, but Tennessee also intercepted him twice inside the Titans’ 1.

The Titans (8-6) snapped a four-game win streak with only their second loss in seven games.

PACKERS 21, BEARS 13: Aaron Jones ran for two scores, Davante Adams caught another in the 200th edition of the NFL’s oldest rivalry as Green Bay (11-3) beat visiting Chicago (7-7) to clinch a playoff spot.

The Packers improved to 19-5 against their NFC North rival with Aaron Rodgers as the starting quarterback. Rodgers completed just 16 of 33 passes for a 203 yards but did enough to secure the victory.

CHIEFS 23, BRONCOS 3: Patrick Mahomes threw for 340 yards and two touchdowns, and Tyreek Hill and Travis Kelce were on the receiving end of many of his biggest throws, as the AFC West champions (10-4) romped to remain in the hunt for the No. 2 playoff seed and a potential first-round bye by beating Denver (5-9).

COWBOYS 44, RAMS 21: Dak Prescott threw two touchdown passes and Ezekiel Elliott ran for two scores as host Dallas (7-7) beat Los Angeles (8-6) to end its second three-game losing streak of the season.

VIKINGS 39, CHARGERS 10: Dan Bailey kicked four field goals and Ifeadi Odenigbo scored Minnesota’s second defensive touchdown in three games as the Vikings (10-4) topped the host Chargers (5-9).

Los Angeles led 10-9 midway through the second quarter before Minnesota scored 30 unanswered points.

SEAHAWKS 30, PANTHERS 24: Russell Wilson threw for 286 yards and two touchdowns, Chris Carson ran for 133 yards and two scores as visiting Seattle (11-3) beat Carolina (5-9).

The Seahawks wrapped up a postseason berth for the seventh time in the last eight seasons when the Rams lost to Dallas. They also tied San Francisco for the NFC West lead.

EAGLES 37, WASHINGTON 27: Carson Wentz recovered from a late fumble by leading a 75-yard, go-ahead scoring drive and throwing his third touchdown pass of the day as Philadelphia (7-7) beat host Washington (3-11).

Wentz threw TD passes to running back Miles Sanders, tight end Zach Ertz and receiver Greg Ward and was 30 of 43 for 266 yards. The 4-yard pass from Wentz to Ward with 26 seconds left put Philadelphia up for good.

CARDINALS 38, BROWNS 24: Kenyan Drake ran for four touchdowns, Kyler Murray threw for 219 yards and a score and host Arizona (4-9-1) topped Cleveland (6-8) to snap a six-game losing streak.

JAGUARS 20, RAIDERS 16: Gardner Minshew threw two TD passes to Chris Conley in the final 5:15 of the game and Jacksonville (5-9) spoiled the final scheduled game at the Oakland Coliseum.

The Raiders (6-8) broke to a 16-3 lead and appeared comfortably ahead before falling apart in the closing minutes to put a damper on an already somber day in Oakland.

GIANTS 36, DOLPHINS 20: Two-time Super Bowl MVP Eli Manning threw two touchdowns in what might have been his final home start for the Giants (3-11) and New York snapped a franchise record-tying nine-game losing streak by beating Miami (3-11).

BUCCANEERS 38, LIONS 17: Jameis Winston became the first player in NFL history to throw for 450 yards in consecutive games as visiting Tampa Bay (7-7) topped Detroit (3-10-1).

Comments are not available on this story.