Updated

The Miami Dolphins were halfway to an upset that could have jumbled the AFC playoff picture.

Then came the second half.

The Dolphins gained just 21 yards in the third quarter and blew a 17-0 lead in less than 15 minutes as the New England Patriots rallied for a 27-24 win on Sunday.

"This one's pretty tough," said Reggie Bush, who ran for 113 yards on 22 carries.

Bush also surpassed 1,000 yards rushing in a season for the first time in his career, yet was in no mood to celebrate.

After gaining 255 yards in the first half, Miami (5-10) had just 126 in the second half and 80 of those came during a late touchdown drive as the Dolphins desperately tried to recover after bumbling their way through the third and most of the fourth quarters.

"We felt like we had the right game plan. We knew what we had to do, we just didn't execute it for four quarters," Bush said. "We made some mistakes on offense. That gets you beat playing against good teams like this."

Both of Miami's turnovers came in the second half and the pressure it had gotten on New England's Tom Brady early was gone.

Brady shook off a poor start and passed for 304 yards and a touchdown. He also had a pair of 1-yard TDs rushing as the Patriots once again looked like contenders for the top seed in the AFC with one scoring drive after another.

"We stalled there a little bit in the second half. You can't do that against a team like this," said Matt Moore, who completed 17 of 33 passes for 294 yards and three touchdowns for Miami.

New England opened the second half with a drive for a field goal to cut Miami's lead to 17-3, then got the ball right back when Moore fumbled a snap and Vince Wilfork pounced on it for the Patriots.

That led to a touchdown pass from Brady to Deion Branch to get New England within 17-10 with 7:10 left in the third quarter and New England's defense kept up the pressure.

Moore was sacked for a loss of 10 on the first play after the kickoff, then sacked again at the 10-yard line on third down. The Dolphins' punt from their end zone gave New England the ball at Miami's 41 and the Patriots continued their surge, scoring on Brady's 1-yard run to tie it at 17l with 2:17 still left in the third quarter.

"We put our defense on the short field too many times, which made it easy for them," Bush said.

The Dolphins didn't score at all in the second half until Moore threw a 15-yard touchdown pass to Davone Bess, pulling Miami within a field goal with 1:48 left to play. The Dolphins still had all three timeouts, but that no longer mattered when Brady converted on third-and-5 with a pass to Wes Welker, who had 12 catches for 138 yards.

New England (12-3) won its seventh straight game. After the Houston Texans lost to the Indianapolis Colts on Thursday night, the Patriots needed a win or a tie to lock up one of the top two spots in the AFC.

Miami lost for the third time in eight games after opening 0-7 and is 1-1 under Todd Bowles, who took over when Tony Sparano was fired.

"The guys fought, but we didn't finish," Bowles said. "We didn't stop them and we didn't get points."

The Dolphins seemed headed for a victory and got a break even before the game started when Patriots left tackle Matt Light hurt his ankle in warm-ups and didn't play. Left guard Logan Mankins took his spot, but he left with a knee injury suffered on New England's second series.

Their absence showed as the Dolphins kept pressuring Brady. He completed just 7 of 19 passes for 87 yards and was sacked three times in the half. But once the third quarter began, Brady and the Patriots — both their offense and defense — looked completely different starting with the very first play, a 22-yard completion to Rob Gronkowski.

Bush had another outstanding game for Miami with his fourth straight rushing day of at least 100 yards. He finished with 113 on 22 carries one week after gaining a career-high 203 yards.

The Dolphins had taken a 3-0 lead on Dan Carpenter's 47-yard field goal 4:01 into the game and made it 10-0 with 1:15 gone in the second quarter on Moore's 19-yard pass to Brandon Marshall.

They stretched that to 17-0, the Patriots' biggest deficit of the season, on a 1-yard touchdown pass from Moore to Charles Clay. The 89-yard drive was helped by two defensive pass interference penalties on third down.

The Patriots punted on their first six possessions, then wasted a chance to score when Stephen Gostkowski's 51-yard field goal attempt on the next to last play of the half went wide to the left.