OAKLAND, Calif. -- Tennessee Titans quarterback Ryan Fitzpatrick came up with the perfect way to celebrate his 31st birthday Sunday.
Fitzpatrick threw a 10-yard touchdown pass to wide receiver Kendall Wright with 10 seconds left to play, lifting Tennessee to a 23-19 victory over the Oakland Raiders and saving the Titans' season.
The Titans (5-6) moved into a six-way tie for the AFC's second wild-card berth. The Raiders (4-7) lost for the third time in four games.
Tennessee marched 80 yards in 14 plays for the winning touchdown, with Fitzpatrick picking apart the Raiders' secondary.
"We knew going in this was, in our world, a playoff game," Titans coach Mike Munchak said. "We couldn't fall to 4-7. We knew that. Just like they thought the same way. That was a huge drive.
"I thought Fitz did a great job. I thought all day long he made a lot of really good decisions. That drive, a lot of great throws. This guy's making plays, and that's what it's all about in this league."
Facing third-and-goal from the 10 with 15 seconds left, Wright lined up in the left slot and beat cornerback Tracy Porter with a quick move to the outside. He went low to catch Fitzpatrick's pass, then lunged into the end zone before an Oakland defender made contact.
"We knew we needed to go down and score," said Fitzpatrick, who earned his first victory with the Titans in his fourth start. "We wanted a touchdown there. We didn't want to settle for anything else.
"It was a good feeling, the confidence we had in the huddle. We knew we were going to get the job done."
Fitzpatrick completed 30 of 42 passes for 320 yards and two touchdowns with no interceptions. He posted a 109.2 passer rating. Wright caught six passes for 103 yards. Wide receiver Justin Hunter caught six passes for 109 yards and a touchdown.
Raiders rookie quarterback Matt McGloin, making his second career start, completed 19 of 32 passes for 260 yards with one touchdown and one interception. His passer rating was 81.9.
In his first NFL start last week in place of injured Terrelle Pryor, McGloin threw three touchdown passes and led the Raiders to a 28-23 victory over the Houston Texans. Pryor suited up against Tennessee as McGloin's backup, and McGloin will start again Thursday against the Dallas Cowboys, Raiders coach Dennis Allen said.
"I thought Matt played well," Allen said. "And for him to lead us back when we needed a touchdown. He got us the touchdown we needed to give us the lead. We just couldn't hold it defensively."
McGloin threw a 27-yard touchdown pass to fullback Marcel Reece with 6:10 left to play, giving the Raiders a 19-16 lead. McGloin marched the Raiders 75 yards in just five plays for the go-ahead score, completing all four of his passes for 74 yards on the drive.
That left Fitzpatrick just enough time to get the Titans into the end zone. He hit Wright for 21 yards early in the drive during a streak of eight completions.
The Titans converted 10 of 18 third downs for the game and three of those came on the winning drive.
"You know, to let a team drive down late in the game today and then get a touchdown to get the go-ahead score, it's pretty disappointing," Raiders safety Charles Woodson said. "We didn't expect to have that happen today."
Wright hurt an ankle earlier in the quarter, but he quickly returned to the field and proved to be too quick for Porter to cover.
"It's still hurting, but I don't like being in the training room, and while I was down there I was thinking, 'I'm not waking up at 6 in the morning for treatment," Wright said, laughing. "I just got up and told them to tape it up. I had to get out there and help my teammates."
After spotting the Raiders a 9-6 first-half lead, the Titans took the opening kick in the second half and quickly drove 85 yards for a touchdown. Fitzpatrick hit Hunter for a 54-yard scoring pass.
Fitzpatrick opened the drive with a 23-yard completion to Wright. Three plays later, Hunter caught Fitzpatrick's pass near the right sideline, spun away from safety Brandian Ross and outran Ross and cornerback Phillip Adams to the end zone. That gave Tennessee a 13-9 lead with 12:52 left in the third quarter.
Raiders kicker Sebastian Janikowski, who missed from 32 yards at the end of the first half, missed from 48 yards after Oakland stalled at Tennessee's 30 in the middle of the third quarter.
Janikowski drilled a 42-yarder -- his fourth field goal of the day -- with 1:41 left in the third, cutting Tennessee's lead to 13-12.
Tennessee extended its lead to 16-12 on Rob Bironas' 23-yard field goal with 8:39 left in the game, capping a 75-yard drive.
NOTES: The Raiders played without WR Denarius Moore, who was out with a shoulder injury. ... Raiders RB Darren McFadden was sidelined for the second consecutive week due to a hamstring injury. ... Titans starting TE Craig Stevens suffered a concussion early in the first quarter and didn't return. ... Raiders TE Mychal Rivera suffered a concussion in the second quarter and CB Mike Jenkins suffered one in the fourth quarter. ... Raiders OLB Kevin Burnett suffered a quad contusion in the fourth quarter.