MIAMI GARDENS, Fla. — Jason Sanders kicked his fifth field goal of the game, a 29-yarder as time expired, and the Miami Dolphins secured a playoff berth with a 22-20 victory over the Dallas Cowboys on Sunday.

Tua Tagovailoa threw for 293 yards and a touchdown for the AFC East-leading Dolphins (11-4), who beat a team with a winning record for the first time this season. He connected with Tyreek Hill twice on the decisive drive, which covered 64 yards and took the final 3:27 off the clock.

Hill, who leads the NFL in receiving yards, had nine catches for 99 yards after missing last week’s victory over the New York Jets with an ankle injury.

The Dolphins, who visit the Ravens next week, have a 27% chance of clinching the No. 1 seed in the AFC playoffs, according to The New York Times playoff simulator. Only the Ravens (11-3) have a higher one, at 57%.

The Baltimore Banner thanks its sponsors. Become one.

Dak Prescott went 20-for-32 for 253 yards and two touchdowns for the Cowboys (10-5), who have clinched a playoff spot but fell a half-game behind Philadelphia in the NFC East.

Prescott put the Dallas in front 20-19 with an 8-yard touchdown pass to a leaping Brandin Cooks in the corner of the end zone. But the Cowboys were haunted by their red-zone struggles earlier in the game, including a fumble by Prescott on first-and-goal from inside the 1 on Dallas’ first possession.

Sanders’ first field goal was a career-long 57-yarder in the first quarter. He added kicks of 52, 54 and 35 yards to help the Dolphins take a 19-10 lead late in the third.

Prescott rallied the Cowboys with some dynamic playmaking. On the go-ahead drive, he completed a pass to Michael Gallup as Miami linebacker Duke Riley was pulling him to the ground at the 21.

After Miami safety DeShon Elliott was flagged for defensive holding in the end zone on fourth-and-goal, Prescott got the ball to Cooks, who hauled it in over over All-Pro cornerback Jalen Ramsey.

The Baltimore Banner thanks its sponsors. Become one.

CeeDee Lamb caught six passes for 118 yards for the Cowboys, including a 49-yard score in the first quarter.

Raheem Mostert scored his NFL-leading 21st touchdown of the season on a grab from Tagovailoa just before halftime. The 31-year-old, who was undrafted out of Purdue in 2015 and bounced around the league earlier in his career, had 46 yards rushing Sunday to put him over 1,000 yards for the first time in his career. He’s the Dolphins’ first 1,000-yard rusher since Jay Ajayi in 2016.

More From The Banner