ATLANTA (AP)Marcus Mariota doesn’t spend much time dwelling on the past.

Yet this was a week the Atlanta Falcons quarterback couldn’t ignore.

Three years ago, at this very point in the NFL season, Mariota was benched by the Tennessee Titans.

”I knew I had to find my confidence to play at a high level,” Mariota said. ”When you get your confidence taken away from you, it’s tough as an athlete. That is truly the only mental weapon you have.”

His confidence growing with every game, Mariota appears to be getting his once-promising career back on track with the Falcons.

He threw a pair of touchdown passes and ran for another score against the NFL’s top-ranked defense, leading the Falcons to a 28-14 victory over the San Francisco 49ers on Sunday.

Mariota, the No. 2 overall pick in 2015, completed his first 13 passes for the Falcons (3-3), finally throwing his lone incompletion on his final attempt of the day.

He finished with 129 yards through the air in Atlanta’s conservative passing game, also rushing for 50 yards on six carries.

”It comes down to just being able to have your opportunity,” said Mariota, who barely played the last 2 1/2 years before getting a chance to take over for Matt Ryan in Atlanta. ”I will be forever grateful to this organization for allowing me to have that chance.”

The Niners (3-3) couldn’t overcome two interceptions by Jimmy Garoppolo and a fumble by Jeff Wilson that resulted in a Falcons touchdown.

Kyle Pitts caught his first TD pass of the season and just the second of his 22-game career, hauling in a 7-yard throw from Mariota that prompted the young tight end to break out the vintage ”Dirty Bird” dance.

Veteran tight end MyCole Pruitt, who was elevated from the practice squad for the game, collected the other scoring pass from Mariota, a 2-yarder to cap an 11-play, 74-yard drive on Atlanta’s opening possession.

Mariota bootlegged it in from the 3 in the final minute of the first half to the put the Falcons ahead to stay, 21-14.

”That’s a real good defense,” Falcons coach Arthur Smith said. ”We knew we had to be efficient, and Marcus definitely was.”

Atlanta’s defense wasn’t too shabby, either. The Falcons made things tough on Garoppolo, limited San Francisco to 50 yards rushing and even scored a touchdown of their own.

On a third-and-1 plunge into the line, Wilson had the ball knocked away by Rashaan Evans. A.J. Terrell scooped it up at the San Francisco 21 and took off for the end zone. He fumbled, too, trying to stretch across the goal line, but teammate Jaylin Hawkins gobbled up the loose ball to put the Falcons ahead 14-0.

”I was going to celebrate with him, but then I was like, `Oh, shoot!”’ Hawkins said, describing when he saw the ball bouncing free in the end zone. ”I just made a heads-up play.”

It was quite a day for Hawkins, who also had an interception.

San Francisco tied it with touchdowns on back-to-back possessions in the second quarter, both of them on TD throws to Brandon Aiyuk.

Garoppolo connected with Aiyuk on a 12-yard score, the Falcons went three-and-out, Ray-Ray McCloud broke off a 35-yard punt return, and Garoppolo went to Aiyuk again for a 14-yard TD toss.

But that was all the points the Niners could muster. The Falcons controlled the clock by outrushing San Francisco 168-50 on a season-high 40 carries.

Isaiah Oliver, in his season debut after spending the first five games on injured reserve, had the Falcons’ other pick.

”I thought we had a lot of opportunities, we just didn’t take advantage of them,” Garoppolo said. ”Self-inflicted wounds, really.”

SHANAHAN RETURNS

Niners coach Kyle Shanahan returned to Atlanta for the first time since he was offensive coordinator on the Falcons’ Super Bowl team.

San Francisco had last played in Atlanta during the 2016 season, losing 41-13. Shanahan was on the Falcons’ sideline that day, part of a staff that guided the team to the title game but infamously squandered a 28-3 lead to the Patriots.

Shanahan left afterward to coach the 49ers.

RUNNING BACK BY COMMITTEE

With Cordarrelle Patterson on injured reserve, the Falcons are still producing in the ground game with a committee approach.

Caleb Huntley led the way with 16 carries for 59 yards, rookie Tyler Allgeier chipped in with 51 yards on 15 carries, and Mariota, of course, contributed as well.

”When we run the ball the way we do, and make some plays in the passing game, we’re very tough to defend,” Mariota said.

INJURIES

49ers: Already without DE Nick Bosa because of a groin injury, San Francisco lost two more starters during the game. CB Charvarius Ward (groin) and OT Mike McGlinchey (left calf) both hobbled off the field in the first half and didn’t return. WR Ray-Ray McCloud III and S Talanoa Hufunga also missed time being evaluated for possible concussions. Both were cleared to return to the game.

Falcons: CB A.J. Terrell (thigh) was injured in the second half and didn’t return. Atlanta’s other starting cornerback, Casey Hayward, also hobbled off late in the game with a shoulder injury.

UP NEXT

49ers: Return home from two weeks on the East Coast to host the Kansas City Chiefs next Sunday.

Falcons: Wrap up a tough stretch of games to begin the season by traveling to Cincinnati to face the defending AFC champion Bengals next Sunday.

Follow Paul Newberry on Twitter at https://twitter.com/pnewberry1963

More AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL