MIAMI GARDENS, Fla. (AP) -- Desperate to stop Tom Brady's latest comeback bid, the Miami Dolphins sought help from a reserve safety making his NFL debut after being signed Tuesday off the San Francisco 49ers' practice squad.
Michael Thomas came through, intercepting Brady's fourth-down pass in the end zone with 2 seconds left Sunday to seal a seesaw 24-20 victory over the New England Patriots.
Thomas celebrated by flopping to his back and was swarmed by his new teammates.
"I didn't know what his first name was," defensive tackle Jared Odrick said. "That's being thrown in the fire and reacting. That's a pure athlete."
The Dolphins (8-6) won their third game in a row to help their AFC wild-card chances. They also snapped a streak of seven consecutive losses to the Patriots (10-4), who missed a chance to clinch their fifth consecutive AFC East title.
Miami's breakthrough win left even stoic second-year coach Joe Philbin in a mood to celebrate.
"I might jump in my pool," he said. "I've been in it once since I've been here."
Brady threw for 364 yards, but was frustrated by a succession of squandered scoring chances. He answered only two questions at his postgame news conference before cutting the session short.
"We didn't do a good job in the red area, and didn't do a good job finishing drives," he said. "We came up on the short end of the stick. It wasn't a good day. Just couldn't make enough plays."
The Patriots had mounted second-half rallies to win their past three games, and were on the verge of doing it again when Brady led them from their own 20 with 1:15 remaining to the Miami 14.
"The longest 75 seconds of my life," said Miami quarterback Ryan Tannehill, who squirmed on the sideline.
With New England out of timeouts, Brady threw for the end zone four times in a row. The first three passes went incomplete, including one intended for Danny Amendola that Thomas broke up on first down.
Then, Thomas stepped in front of Austin Collie to make his interception.
"I knew being the new guy that Tom Brady would come after me," Thomas said. "He's a great quarterback, and he's going to exploit any weaknesses. I knew if I got in there I would have a chance. I saw the ball in the air and I made a play."
Thomas was part of an injury-depleted secondary that also included backups at both cornerback spots on the final drive. A large supporting cast has played a significant role in the recent success of the Dolphins, who are 5-2 since tackle Jonathan Martin left the team in a bullying scandal that drew national notoriety.
"We've grown a lot," Tannehill said. "Each of us has gotten stronger through the adversity we've faced off the field and on the field."
Tannehill shook off four sacks to throw for 312 yards and three touchdowns, including a 14-yarder to Marcus Thigpen with 1:15 left that provided the winning margin. His other scoring passes covered 39 yards to Mike Wallace and 2 yards to Daniel Thomas.
Brady went 34 for 55 and threw two scores. Julian Edelman made 13 catches for 139 yards, and Amendola added 10 receptions for 131 yards.
New England took a 20-17 lead when Edelman scored on a 24-yard reception with four minutes left, but the Dolphins caught a break when the ensuing kickoff by Stephen Gostkowski went out of bounds, allowing them to start at their 40.
Charles Clay kept the driving going when he turned a short pass into a 6-yard gain on fourth and 5 at midfield, and Thigpen scored five plays later.
New England, accustomed to slow starts, took a 10-0 lead on Michael Hoomanawanui's one-handed, 13-yard touchdown reception. But on other trips to the red zone they missed tight end Rob Gronkowski, who suffered a season-ending knee injury a week ago.
The Patriots mounted drives of 16 and 15 plays but settled for a field goal each time, and Gostkowski misfired on a field-goal try for only the third time this year when he sailed a 48-yard attempt wide left.
"Today just wasn't my day," Gostkowski said. "It stinks to play terrible and your team loses. It's like salt on the wound."
Special teams were only part of the Pats' problem, coach Bill Belichick said.
"We were short in every area," he said. "Nothing was really good enough."
Notes: Patriots T Nate Solder aggravated a head injury in the second half and sat out rest of game. ... Dolphins DT Paul Soliai sat out the last three quarters with an ankle injury. CB Nolan Carroll (knee) was limited in the second half, and CB Brent Grimes (cramps) went to the sideline in the fourth quarter. ... The Dolphins botched a field-goal try when John Denney snapped the ball before holder Brandon Fields was ready, and the ball hit Fields in the face mask. ... Miami's seven home games have been decided by a total of 23 points.