FOXBORO -- Devin McCourty intercepted Ryan Fitzpatrick in the end zone with 23 seconds left to stop a potential game-winning drive by the Bills and preserve a 37-31 win Sunday at Gillette Stadium.
Danny Woodhead caught an 18-yard touchdown pass and ran for another score as the Patriots took command of the AFC East with the wild win over the Bills. The Patriots took full advantage of an undisciplined Buffalo team that committed 14 penalties for 148 yards. Tom Brady finished 23-of-38 for 237 yards and two touchdowns. The Patriots defense, which gave up 481 yards and 35 first downs, had to make one final stand to preserve the win in the final two minutes.
The Patriots improved to 6-3 on the season, good for a two-game lead on the Dolphins in the AFC East. The Patriots lost two offensive linemen in the game, as Dan Connolly suffered a back injury and Logan Mankins injured his left ankle. Both left in the second half and did not return.
Thanks to 10 Buffalo first-half penalties, the Patriots dominated early. After a Stephen Gostkowski field goal put them on top 3-0, Vince Wilfork broke through for a strip-sack of Ryan Fitzpatrick and Jermaine Cunningham recovered. The Bills committed a pair of penalties in the end zone to set up Stevan Ridley's one-yard TD run.
The Bills responded with a field goal before the Patriots marched 83 yards in eight plays, capped off by a 16-yard Danny Woodhead touchdown run up the middle, putting New England ahead, 17-3.
The Bills, who amassed 229 yards in the first half, responded with an 80-yard drive culminating in a 14-yard TD run by Fred Jackson. The Patriots used a 37-yard pass interference penalty on Leodis McKelvin in the end zone to set up their third touchdown of the first half, a spectacular diving grab by Rob Gronkowski in the right corner of the end zone. But the Bills responded by driving down the field, aided by a 15-yard personal foul late hit by Alfonzo Dennard on Fitzpatrick, who hit a wide open Scott Chandler in the end zone to make it a 24-17 Patriots lead at the half.
The Patriots were forced to punt for the first time on their first possession of the second half but scored on their second possession when Danny Woodhead took a pass from Brady and raced 18 yards, just extending the ball over the goal line before his knees hit the ground. The Bills came back with an 84-yard drive, capped off by Jackson's second TD run of the day.
Leading by 10 with 10 minutes left, McCourty made a huge play, forcing a fumble by C.J. Spiller at the goal line, recovered by Kyle Arrington. The Patriots could not take advantage as Wes Welker dropped a pass that would've given the Patriots another three downs. Instead, they punted from the back of the end zone, setting up the Bills in Patriots territory. The Bills scored on a two-yard TD pass from Fitzpatrick to Donald Jones with seven minutes left to cut the Patriots lead to 34-31.
The Patriots improve to 6-3 and will host Andrew Luck and the Colts next Sunday at Gillette Stadium. For complete coverage from the team of Chris Price, Mike Petraglia and Kirk Minihane at Gillette, visit the Patriots team page at weei.com/patriots  and the blog It Is What It Is .