SAN DIEGO (AP) - It's three down and three to go for the San Diego Chargers.
The Chargers needed three games to end in their favor on Sunday. They all did, including their 26-13 victory against the rival Oakland Raiders.
Now they've got to go through it all over again next Sunday in order to snag the AFC's second wild-card berth.
Buffalo's 19-0 win against Miami was being shown on the scoreboard video screen while the Chargers were warming up. Updates of New England's 41-7 victory against Baltimore were shown during the game.
''I was going to know, somehow,'' said quarterback Philip Rivers, whose Chargers had to have both Miami and Baltimore lose in order to stay alive.
In overcoming three turnovers, the Chargers got a lot of help from the Raiders - two turnovers and 12 penalties for 73 yards by the Raiders.
The Chargers (8-7) have won three straight games for the first time this season, but head into their finale still needing help. They have to beat Kansas City at home while needing Baltimore to lose at Cincinnati and Miami to lose at home to the New York Jets.
''All three went our way today, including the one we had our control in,'' Rivers said. ''Same boat next week. We need all three to go our way. The only one we can control is the one here against the Chiefs.''
Rivers threw a go-ahead, 4-yard touchdown pass to rookie Keenan Allen with 5 minutes left in the third quarter and Ryan Mathews ran for 99 yards and one touchdown, setting a career high with 1,111 yards. Nick Novak kicked four field goals for San Diego.
''The Chargers are still beating and I know no one wants to play us right now, that's for sure,'' said safety Eric Weddle, who had an interception.
The Raiders (4-11) played like a team that will miss the playoffs for the 11th straight season.
Here are five takeaways from the game:
RYAN MATHEWS: Mathews limped to the locker room in the fourth quarter but later returned to the game. He had a bandage on his left ankle afterward and left the stadium wearing a protective boot on his left foot. The Chargers are loathe to give out injury updates, so it remains to be seen whether the boot is precautionary or if the injury is serious. Mathews fell 1 yard short of his third straight 100-yard game and sixth overall this season. Mathews' final run of the day was away from the media - he grabbed his clothes, a backpack and a football and headed to the trainer's room, which is off limits to reporters.
KEENAN ALLEN: The rookie had what he called ''one of my best-worst games, you could say.'' Besides the go-ahead TD grab, Allen fumbled a punt that the Raiders recovered to set up Sebastian Janikowski's 20-yard field goal to tie the game at 10 with 10 seconds left before halftime. ''The touchdown kind of evened it all out, but I definitely have some corrections to make.''
RAIDERS PENALTIES: Oakland repeatedly helped the Chargers continue drives. One of the biggest blunders came when Mike Jenkins was penalized 15 yards for taunting Mathews after he pushed the running back out of bounds. Allen scored six plays later. ''We had too many penalties,'' Raiders coach Dennis Allen said. ''A lot of our penalties, specifically defensively, came on third down, which allowed them to extend some drives.''
PAGING NICK NOVAK: Novak finished with four field-goals. The only score of the first half that wasn't set up by a turnover was a 27-yard field goal by Novak in the first quarter. The Chargers misfired on more plays than they'd have liked, and they had to call on Novak three more times in the second half, from 48, 28 and 33 yards.
SLOPPY: The game was tied at 10 after a messy first half that included three turnovers by the Chargers and seven penalties for 39 yards by the Raiders. Early in the second quarter, Rivers wasn't ready for a shotgun snap and the ball bounced off him for a fumble that was recovered by former San Diego State linebacker Miles Burris at the Raiders 42, setting up Darren McFadden's 5-yard run for a 7-3 Oakland lead. Rivers was picked off by Mike Jenkins to end San Diego's next drive, but Weddle then intercepted Matt McGloin at the Raiders 20, deflecting the ball to himself. That set up Mathews' 7-yard run and the Chargers regained the lead at 10-7. Allen's fumbled punt was recovered by Shelton Johnson at the 16. The Raiders had to settle for Janikowski's tying 20-yard field goal with 10 seconds left before halftime.
Online: http://pro32.ap.org/poll and http://twitter.com/AP-NFL