MIAMI GARDENS, Fla. (AP) Derek Carr threw for 300 yards and the Oakland Raiders overcame two fluky plays that cost them possession to beat the Miami Dolphins 27-24 on Sunday night.

Carr went 21 of 30 with one touchdown and one interception. He helped the Raiders convert 8 for 15 third downs.

The Dolphins recovered an onside kick and came up with a takeaway when Oakland fumbled twice on a single play, but failed to convert either opportunity into points. Oakland also overcame 10 penalties for 105 yards, including three for unnecessary roughness in the second quarter.

The Raiders' Marshawn Lynch, returning from one-game suspension for shoving an official, scored on a 22-yard run, his longest this year. He added another late score and finished with 57 yards on 14 carries.

Oakland (4-5) won for only the second time since Week 2. Miami (4-4) fell to .500 for the third time this season, and lost a close game for the first time in more than a year. In games decided by seven points or less, they had won 12 in a row.

Miami's Jay Cutler, back after missing one game with cracked ribs, completed his first 16 passes and finished 34 for 42 for 311 yards and three scores. His touchdown pass with 1:32 left cut the deficit to three points, but Oakland recovered the ensuing onside kick to seal the win.

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.