OAKLAND, Calif. -- The Los Angeles Chargers had lost four straight games to the Oakland Raiders, the previous three by three points, before meeting Sunday at Oakland-Alameda County Coliseum.
This time, the Chargers were on the right side of a close game against the Raiders.
Nick Novak kicked the winning 32-yard field goal as time expired, lifting the Chargers to a 17-16 victory.
The Chargers (2-4) won their second straight game and the Raiders (2-4) lost their fourth straight.
"I didn't know two and four could feel as good as this," Chargers quarterback Philip Rivers said. "It was an old-school Chargers-Raiders game, just as far as low scoring, back and forth. We hung in there. We had a handful of plays we'd love to have back, but made enough to get it done."
The Raiders, who began the season with Super Bowl hopes, have a different feeling about being 2-4, especially with a game against Kansas City on Thursday night looming.
"Ain't nobody going to feel sorry for you," Raiders cornerback David Amerson said. "Ain't nobody going to save us. We just need to buckle down, move on. It's crazy. It's coming pretty quick."
Chargers running back Melvin Gordon carried 25 times for 83 yards and a touchdown and caught nine passes for 67 yards and a score. Rivers threw for 268 yards and one touchdown, completing 25 of 36 passes.
Raiders quarterback Derek Carr returned to action after missing one game with a small broken bone in his back and threw for 171 yards with one touchdown and two interceptions. He completed 21 of 30 passes and had a passer rating of 67.5.
"There was no talk of trying to get the ball out of my hands or anything like that," Carr said. "We were out there just playing. ... I felt really good."
The Chargers hadn't won back-to-back games since nearly a year ago when they beat Denver in Week 6 and Atlanta in Week 7.
The Raiders took a 16-14 lead with 7:51 left on Cordarrelle Patterson's 47-yard end around for a touchdown. Giorgio Tavecchio, who has made all nine of his field-goal attempts, missed the extra-point try, and the Raiders' lead remained two points.
The Chargers and Raiders then had three-and-outs, and after an Oakland punt, the Chargers began their final drive at their 8-yard line with 4:09 remaining.
Rivers hit tight end Hunter Henry for 34 yards on first down. Two plays later, he connected with Henry for 23 yards to the Raiders' 33.
"It was nice to have my number called," Henry said. "Trying to make a play when the team needs me. It was nice for the offense to go down there and put the game away."
Gordon carried five straight times, giving the Chargers first-and-goal from the 10 with under 1:40 left and the Raiders out of timeouts.
Novak had been out of the NFL after Houston axed him in the final round of roster cuts before the season. He re-signed with the Chargers, his team from 2011 to 2014, on Oct. 5.
Novak made both of his field-goal attempts three days later in a victory over the New York Giants, but he missed a 48-yard try in the first quarter Sunday.
Chargers head coach Anthony Lynn said he wasn't worried when Novak lined up for his field goal with three seconds on the clock.
"He doesn't miss the ones when the game is on the line," Lynn said. "I did a little research on him."
The Raiders clung to a 10-7 lead after a scoreless third quarter. But on the first play of the fourth quarter, Carr threw incomplete on fourth-and-2 and the Chargers took over at their 41.
Los Angeles marched 59 yards in 10 plays for a touchdown as Gordon scored on a 6-yard screen pass from Rivers. That gave the Chargers a 14-10 lead with 10:19 remaining.
The Raiders answered with Patterson's long touchdown run. Patterson lined up wide right, went in motion left and blasted around left end. He cut back at the 25 and scored. It was his sixth career rushing touchdown and second this year.
"I'm a playmaker, and that's just something I do," Patterson said. "Every time I get the ball in my hands I feel like I'm going to score no matter when I touch the ball. That's the mentality I have. I was just born like that."
The Raiders struck first, taking their first lead since Week 2 against the New York Jets, on Carr's 23-yard touchdown pass to wide receiver Michael Crabtree with 5:04 left in the first quarter. Crabtree lined up in the right slot and broke wide open as he cut toward the right sideline. Carr hit him in stride, beating the blitz.
Los Angeles pulled even with 1:44 left in the half on Gordon's 1-yard touchdown run on fourth down, capping a 15-play, 82-yard drive.
Rivers' 28-yard strike to wide receiver Keenan Allen gave the Chargers a first down at the Raiders' 49. Later in the drive, Rivers connected with tight end Antonio Gates for 16 yards and Allen for 13.
The Raiders took a 10-7 lead on Tavecchio's 44-yard field goal on the final play of the first half.
NOTES: Chargers rookie WR Mike Williams, a first-round draft pick who had been sidelined by a herniated disk in his lower back, made his NFL debut and caught one pass for 15 yards. ... Raiders MLB Marquel Lee (ankle) was inactive and Tyrell Adams started in his place. ... Chargers T Joe Barksdale (foot), a former Raider, was active. ... Raiders FB Jamize Olawale (concussion) was inactive. ... Raiders CB David Amerson was in the lineup after missing one game with a concussion.