With seven seconds left in the fourth quarter and 69 yards from defeat, the trailing Miami Dolphins scored a surprise 34-33 victory over the New England Patriots at the Hard Rock stadium on Sunday thanks to the team's miracle "Boise" play, The Miami Herald reported.

Dolphins quarterback Ryan Tannehill threw a short pass and then watched his teammates save the season with the "Drake Escape."

Kenyan Drake ran the last 52 yards as the Dolphins scored on a pass and double lateral on the final play Sunday to beat the Patriots. With that, Miami lived up to its "Magic City" nickname.

The Patriots had nearly clinched their 10th consecutive AFC East title when the Dolphins lined up at their 31 after a kickoff return trailing 33-28.

"We had them right where we wanted," Tannehill said dryly. "Not really surprised with how things turned out."

Tannehill threw a 14-yard pass to Kenny Stills, who lateraled to DeVante Parker, who quickly lateraled to Drake along the sideline. He cut toward the middle and found a seam, helped by a block from guard Ted Larsen at the 30.

Drake beat two Patriots to the corner of the end zone — defensive back J.C. Jackson and tight end Rob Gronkowski, who was on the field as part of New England's prevent defense.

Then came one last pass to punctuate the play — Drake reared back for a celebratory heave into the stands as the Dolphins' bench emptied and teammates swarmed him.

The Dolphins call the play "Boise" because it was borrowed from the Boise State playbook, and they had been working on it all year.

Brady threw for 358 yards and three scores, but the stunned Patriots (9-4) lost in Miami for the fifth time in their past six visits. The Dolphins (7-6) came from behind five times to help their slim wild-card chances.

The Patriots' Stephen Gostkowski missed an extra point for the first time in 38 tries this season early in the game, and also missed a 42-yard field goal try. But his 32-yarder to cap a 55-yard drive put the Patriots ahead 30-28 with 6:45 left.

Belichick opted to have Gostkowski kick a 22-yarder in the closing seconds rather than pin the Dolphins near their goal line. Instead, Miami returned the ensuing kickoff to the 31 — and on the next play pulled off a miracle.

Brady broke the NFL record for career touchdown passes including postseason and now has 582, three more than Peyton Manning. His scores covered 2 yards to Julian Edelman, 37 to Cordarrelle Patterson and 16 to Gronkowski.

Tannehill missed two plays at the end of the first half after a teammate stepped on his right foot. He returned to start the second half, and his 23-yard touchdown pass to Brice Butler put the Dolphins ahead 28-27 late in the third quarter.

But they managed only three first downs and no points thereafter — until the final play.

Fox News' Bradford Betz and The Associated Press contributed to this report.