OAKLAND, Calif. — Wins have been so hard to come by for the Oakland Raiders that it took three tries at the final play for them finally to pull this one out and possibly save their season.

Derek Carr threw a 2-yard touchdown pass to Michael Crabtree on the final play after the game was extended by two straight defensive holding calls and the Raiders snapped a four-game losing streak with a 31-30 victory over the Kansas City Chiefs on Thursday night.

"We didn't give up," Crabtree said. "We got a team full of fighters. We believe. ... No matter how hard the game was, we believed. We came out with the W and I'm excited. It's a good way to win, a great way to win."

With their season on the line following the recent slump, Carr led an 85-yard touchdown drive in the final 2:25 to give the Raiders (3-4) the thrilling comeback in a game they trailed by nine points heading into the fourth quarter.

Carr finished 29 for 52 for 417 yards and three touchdowns, with Amari Cooper catching 11 passes for 210 yards and two of the scores. The Raiders had struggled to get the ball downfield while being held to 17 or fewer points in four straight games but Carr repeatedly beat the Chiefs with deep passes.

"No. 4 kept making plays," coach Jack Del Rio said. "This is a special, special win."

Alex Smith threw for 342 yards and three touchdowns but it wasn't enough for the Chiefs (5-2). They lost consecutive games for the first time since Oct. 11-18, 2015, and had their 12-game winning streak in the AFC West snapped in a thrilling finish.

"I've never been part of a game that came down so dramatic," linebacker Derrick Johnson said. "But, still had a chance to win. Period. Just have to make a play. One play. One play."

The Raiders had an apparent go-ahead touchdown pass to Jared Cook with 18 seconds left overturned when replay ruled he was down at the 1. An offensive pass interference on Crabtree wiped out another touchdown on the next play.

But holding calls on Ron Parker and Eric Murray set the stage for the final play. Carr hit Crabtree in the front corner of the end zone to tie it at 30. Giorgio Tavecchio won it with the extra point , setting off a celebration on a wild night that included Oakland running back Marshawn Lynch getting ejected in the second quarter for shoving an official.

HOT TEMPERS: The game took an odd turn midway through the second quarter after Kansas City's Marcus Peters hit Carr late, angering the Raiders. Offensive linemen Kelechi Osemele and Donald Penn confronted Peters and Lynch sprinted off the Oakland sideline to join the fray. Lynch, a close friend of Peters, ended up shoving line judge Julian Mapp and getting ejected . Peters also was called for a personal foul on the play. Lynch congratulated his teammates in the locker room after the game but didn't speak to reporters.

"I was disappointed he ran out because I knew we had a 15-yard penalty and we'd be in good shape," Del Rio said.

LONG DRIVE: After Marquette King pinned the Chiefs at their own 1 with a perfect punt early in the second quarter, Kansas City needed little time to turn the momentum. Smith hit Demarcus Robinson on a 33-yard pass on the first play of the drive. After a short run, Tyreek Hill beat David Amerson for a 64-yard touchdown pass that gave the Chiefs their first 99-yard drive since doing it Dec. 3, 2006, against Cleveland.

DEEP CONNECTION: Carr had not connected on a single deep ball to Amari Cooper all season before the two teamed twice for long TDs in the opening quarter. On the first, Cooper appeared to push Terrance Mitchell but the officials picked up the flag and gave Cooper the 38-yard TD . Later in the quarter Carr and Cooper connected on a 45-yard score, making Cooper the first Raiders receiver with two TD catches in the first quarter since Mervyn Fernandez in 1989.

KICKING WOES: The Raiders were hurt last week when a bad snap by Jon Condo led to a missed extra point by Giorgio Tavecchio in a 17-16 loss to the Chargers. That was Tavecchio's first missed kick of any kind this season but he then had a 53-yarder blocked and missed a 45-yarder wide left in the second quarter. Tavecchio also had a false start on an extra point in the third quarter.

UP NEXT

Chiefs: Host Denver on Oct. 30.

Raiders: Visit Buffalo on Oct. 29.

___

For more AP NFL coverage: http://pro32.ap.org and http://twitter.com/AP_NFL