SANTA CLARA, Calif — The San Francisco 49ers have ended a six-year playoff drought even though they lost to the Atlanta Falcons 29-22 in a wild finish in which they allowed 12 points in the final two seconds.

That's right, 12 points in the last two seconds.

Julio Jones caught a 5-yard pass from Matt Ryan with two seconds left to give Atlanta a 23-22 lead.

Wide receiver Olamide Zaccheaus recoverd a fumble in the end zone when the 49ers botched the kickoff return when they lateraled in a futile attempt to score on a razzle-dazzle return.

RELATED: Online petitions demand Michael Vick not be allowed NFL Pro Bowl captain honor

The 49ers (11-3) nevertheless made it into the NFC playoff field minutes later when the Dallas Cowboys wrapped up their 44-21 win over the Los Angeles Rams.

The Cowboys' win also put the Green Bay Packers and the Seattle Seahawks into the playoffs.

RELATED: Michael Vick will remain Pro Bowl captain despite backlash, NFL commissioner says

Earlier, the New England Patriots clinched their 11th consecutive playoff berth despite another pedestrian passing performance by Tom Brady.

MORE 11ALIVE SPORTS HEADLINES

Former Falcon, Georgia Tech star and Atlanta locals among 10 former NFL players charged in health care fraud scheme

NFL has 'moved on' from Colin Kaepernick, commissioner Roger Goodell says

Amid outcry, Michael Vick finds support in Atlanta

Former Falcons RB Warrick Dunn to receive Sports Illustrated Muhammad Ali Legacy Award