LAS VEGAS (AP) — Ryan Fitzpatrick completed a 41-yard pass to Mack Hollins while being dragged down by the facemask and the Miami Dolphins moved one step closer to a playoff berth when Jason Sanders’ 44-yard field goal with 1 second remaining gave them a 26-25 victory over the Las Vegas Raiders on Saturday night.

The Raiders (7-8) chose to run down the clock for a go-ahead field goal instead of trying for a touchdown with Josh Jacobs going down on purpose at the 1-yard line and Derek Carr taking a knee to set up Daniel Carlson’s 22-yard field goal with 19 seconds left.

But the Dolphins had some late-game magic with Fitzpatrick launching the deep pass to Hollins while being dragged down by Arden Key. The penalty moved the ball down to the Las Vegas 26, setting up Sanders’ winning kick.

The Dolphins (10-5) moved a half-game ahead of Baltimore in the AFC playoff race and can clinch a wild-card berth with a win next week at Buffalo.

The Raiders (7-8) were eliminated with their fifth loss in six games and will be out of the postseason for the 17th time in 18 seasons.

The back-and-forth final few minutes from Fitzpatrick and Carr made up for a game that lacked offensive fireworks for most of the night. After the Dolphins tied the game at 16 with 4:01 to play, the Raiders took little time to answer.

A holding penalty on first down put them in a hole, but Carr got them right out of it when he scrambled away from pressure despite an injured groin and launched a deep pass to Nelson Agholor, who outjumped Byron Jones for the catch.

Agholor then juked safety Bobby McCain and raced to the end zone for the 85-yard score that put the Raiders up 22-16 after Carlson missed the extra point.

That looked as if it could be costly when Fitzpatrick answered with a short pass to Myles Gaskin that turned into a huge gain. Gaskin broke a tackle from Raekwon McMillan and then got sprung from some downfield blocks on the way to a 59-yard touchdown. Jason Sanders’ extra point gave the Dolphins the 23-22 lead.

That proved short-lived when Jones was called for the penalty on a deep throw to Agholor that gave the Raiders the ball at the 22. Las Vegas then ran out most of the clock but not enough.