NASHVILLE, Tenn. (AP) — Coach Mike Vrabel heard that his banged-up Tennessee Titans were being written off after the left side of their offensive line was ruled out a day before hosting the streaking San Francisco 49ers.

Then they lost their backup left tackle to a positive COVID-19 test Thursday morning, forcing them to use their 52nd different starter and 88th player this season.

“We’re not dead yet,” Vrabel said.

Alive and kicking.

Randy Bullock booted a 44-yard field goal with 4 seconds remaining and the Titans rallied from a 10-point halftime deficit to beat the 49ers 20-17 Thursday night.

The Titans (10-5) are a win or a Colts’ loss away from clinching their second straight AFC South title despite losing three of their past four games to drop from the AFC’s top seed to third. Indianapolis plays Arizona on Saturday. Tennesse moved to second in the AFC.

Ryan Tannehill threw for just 40 yards in the first half but finished with 209 yards and a TD for Tennessee. A.J. Brown caught 11 passes for 145 yards hours after being activated off injured reserve, and his 18-yard TD catch gave Tennessee a 17-10 lead early in the fourth.

“It was all on us and we just had to make a play,” Brown said. “Then we had to make another play. That was the mindset. Just come out here and make plays, so that’s what we did.”

The Titans also picked off two passes, sacked Jimmy Garoppolo twice and forced the Niners to turn it over on downs once.

San Francisco had one final chance. Garoppolo completed a 16-yard pass to Pro Bowl receiver Deebo Samuel, who fumbled, starting three laterals before Jayon Brown finally tackled Brandon Aiyuk to end the game.

The 49ers (8-7) lost for the second time in seven games as they try to hold onto a wild-card berth in the NFC. Their loss ensured a playoff berth for Dallas, which can clinch the NFC East with a win over Washington on Sunday night.

Garoppolo tied it with a 2-yard TD pass to Brandon Aiyuk with 2:20 left, a score set up by a 56-yard catch-and-run by Samuel down to the Tennessee 6.

This was the Niners’ first loss after leading by 10 or more at halftime under coach Kyle Shanahan — they had been 18-0 in the regular season and playoffs with those leads. They hadn’t blown such a lead since Week 14 of 2016 to the Jets under Chip Kelly.

Tennessee played without the left side of its offensive line with left tackle Taylor Lewan out with an injured back and left guard Rodger Saffold on the reserve/COVID-19 list. Rookie Dillon Radunz, a second-round pick out of North Dakota State, replaced Lewan, and the Titans gave up four sacks.

The Niners dominated the first half but missed chances for a bigger lead.

Garoppolo threw for 322 yards and moved the 49ers down the field at ease early, setting upJeff Wilson’s 1-yard plunge on the opening drive and giving them goal-to-go on the second possession. Titans cornerback Jackrabbit Jenkins beat 49ers tight end George Kittle for a what Vrabel called a “critical” interception in the end zone.

“We were running out of steam there,” Vrabel said. “We were flatlining, and he made a huge play for us.”

A face mask penalty on Pro Bowl left tackle Trent Williams forced the Niners to settle for a 48-yard field goal by Robbie Gould and a 10-0 lead.

“We should’ve been up more, that was for sure,” Shanahan said.

Garoppolo knows the Niners had their chances.

“It’s tough when you let one like this slip away,” Garoppolo said.

The Niners led 10-0 at halftime, their first time shutting out an opponent in the first half since the 2019 NFC title game against Green Bay. That also marked four straight scoreless quarters for the Titans.

Tennessee finally strung together a 13-play drive to open the third quarter, matching its first-half production at 55 yards, with Tannehill completing three straight passes on third down until missing a screen to Jeremy McNichols. Bullock kicked a 38-yard field goal to pull the Titans within 10-3.

Titans safety Amani Hooker picked off his first pass this season on the Niners’ next play, returning it 21 yards to the San Francisco 18. D’Onta Foreman finished that short drive with a tying 3-yard TD run.

Then the Tennessee defense, as healthy as it’s been in weeks, forced the Niners to turn it over on downs at the Titans 41 late in the third after having fourth-and-1 when Williams false started.

THIRD DOWN WOES

The Titans had their biggest plays on third down and finished 9 of 16. That included a 42-yard completion from Tannehill to Brown on a free play when Arden Key jumped offsides on the final play of the third quarter and was one of six big third-down conversions the Niners allowed in the second half.

INJURIES

Samuel returned after going down at the end of his 56-yarder, and Niners defensive lineman D.J. Jones hurt an ankle but returned. Shanahan said linebacker Azeez Al-Shaair hurt a knee and didn’t return.

Titans defensive lineman Naquan Jones went down late in the third quarter. Brown had been out since injuring his chest in Week 11 against Houston.

UP NEXT

Niners host Houston on Jan. 2 in their regular season home finale.

Titans host Miami on Jan. 2 in their regular season home finale.

___

Follow Teresa M. Walker at https://twitter.com/TeresaMWalker

___

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