Jason Sanders nailed his fifth field goal of the game as time expired and lifted the Miami Dolphins to a win Sunday evening over the Dallas Cowboys, 22-20.

Miami clinched a playoff spot for the second consecutive season and picked up its first win of the year against a playoff contender in the process. It’s the first time the team clinched a postseason berth in consecutive seasons since 2000 and 2001.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Raheem Mostert celebrates

Raheem Mostert #31 of the Miami Dolphins celebrates a touchdown with Braxton Berrios and Cedrick Wilson Jr. during the second quarter against the Dallas Cowboys on Dec. 24, 2023, at Hard Rock Stadium in Miami Gardens, Florida. (Megan Briggs/Getty Images)

It was a thrilling finish in Miami Gardens.

Dak Prescott and the Cowboys were down 19-13 with 11:06 left in the game, and he guided the team down the field on a 17-play drive that lasted nearly eight minutes. The team tried to score on 4th-and-goal with 4:23 left and missed out, but Dolphins cornerback Xavien Howard was called for a penalty.

FROM OUTKICK: LIONS PLAYERS GO CRAZY IN LOCKER ROOM AFTER CHRISTMAS EVE MIRACLE; EMINEM TAKES CREDIT ON X

Then, Prescott was sacked by Andrew Van Ginkel and Bradley Chubb to push them back further. On 3rd-and-goal, Prescott got the ball to Brandin Cooks who somehow came down with the ball in between two defenders for the go-ahead touchdown.

With 3:27 left, it was Tua Tagovailoa’s time. He led the team on a 12-play, 64-yard drive, converting on third down twice to get Sanders in position for the game-winning kick. He nailed it from 29 yards out.

Brandin Cooks touchdown

Brandin Cooks of the Dallas Cowboys, bottom, scores a touchdown during the fourth quarter against the Miami Dolphins at Hard Rock Stadium in Miami Gardens, Florida, on Dec. 24, 2023. (Stacy Revere/Getty Images)

Tagovailoa finished with 293 passing yards and a touchdown pass to Raheem Mostert. The running back led the team with 46 rushing yards on 11 carries. Tyreek Hill had nine catches for 99 yards.

BROWNS' AMARI COOPER SETS FRANCHISE RECORD IN TEAM'S WIN OVER TEXANS

Prescott was 20 of 32 for 253 yards and two touchdown passes. Wide receiver CeeDee Lamb had six catches for 118 yards and a score. Tony Pollard led the team with 38 yards on 12 carries.

Not only did Miami clinch the playoff berth, the team remains in contention for home-field advantage. By Monday’s end, the Dolphins and Baltimore Ravens could both be 11-4, should the latter lose to the San Francisco 49ers. Miami also has the inside track to the AFC East title.

Jason Sanders celebrates

Jason Sanders #7 of the Miami Dolphins celebrates a field goal with Jake Bailey during the first quarter at Hard Rock Stadium, Dec. 24, 2023, in Miami Gardens, Florida. (Megan Briggs/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Dallas is already in the playoffs and could be in contention for an NFC East title if the Philadelphia Eagles lose to the New York Giants on Monday.

Follow Fox News Digital’s sports coverage on X and subscribe to the Fox News Sports Huddle newsletter.