Bill Belichick earned the 300th regular-season victory of his head-coaching career thanks to some late-game heroics from Mac Jones that lifted the New England Patriots to a 29-25 victory over the Buffalo Bills on Sunday in Foxborough, Mass.

After New England (2-5) squandered a 12-point, fourth-quarter lead, Jones found Mike Gesicki for a go-ahead, 1-yard touchdown with 12 seconds left in the game.

Belichick joins Don Shula (328 wins) and George Halas (318) as the only coaches in NFL history to reach 300 wins in the regular season.

Reaching the milestone didn't come easy, as Josh Allen headlined a ferocious rally for Buffalo (4-3).

Allen connected with Stefon Diggs for a 25-yard TD with 5:32 left in the game before sneaking into the end zone from the goal line with 1:58 to go, giving the Bills a 25-22 edge.

But Jones then put together the game-winning, 75-yard drive that allowed the Patriots to snap a three-game skid.

Jones completed 25 of 30 passes for 272 yards and two TDs. Allen threw for 265 yards, two scores and an interception on 27-for-41 passing.

Buffalo's Dalton Kincaid led all receivers with eight receptions for 75 yards.

Allen orchestrated a 10-play, 81-yard drive to begin the second half, capping it with an 8-yard TD pass to James Cook to cut the Bills' deficit to 13-10.

Chad Ryland pushed the Patriots' advantage to 16-10 with a 49-yard field goal at the end of the ensuing drive.

Jones' 4-yard scoring strike to Kendrick Bourne with 7:36 left in the fourth provided New England with its 12-point advantage. The two-point conversion run failed.

Ryland made a 24-yarder with 7:36 remaining in the first half to put New England up 13-3, and that lead held until the break. Tyler Bass had the chance to make it a one-score game, but his 42-yard attempt sliced wide right.

The Patriots drove to the Buffalo 12-yard line on the game's opening drive, but they had to settle for Ryland's 30-yard field goal.

Jabrill Peppers picked off Allen on the Bills' first offensive snap, though, and New England cashed in seven plays later, as Ezekiel Elliott rushed for a 2-yard touchdown to make it 10-0.

Bass made good on a 36-yard field goal to pull Buffalo within 10-3 just 11 seconds into the second quarter.

More must-reads:

TODAY'S BEST
Three takeaways as Panthers eliminate Rangers, advance to Stanley Cup Final
Corey Heim dominates at Gateway for fourth Truck Series win of 2024 season
Mets honor Darryl Strawberry in fitting fashion during number retirement ceremony
Phillies ace leaves game after taking 106 mph comebacker to hand
Real Madrid defeats Borussia Dortmund 2-0 to win Champions League
Marvin Lewis opens up about about return to NFL coaching
Celtics HC shares Kristaps Porzingis update ahead of NBA Finals
Jalen Brunson claps back at tiredness narrative after Knicks' playoff exit
Red Sox lose yet another player to injury
Former NFL GM has huge praise for Packers QB Jordan Love
Drake Maye reportedly being treated as Patriots' QB3
Veteran 1B rejects outright assignment, elects free agency
Giannis Antetokounmpo to play for Greece in Olympic qualifier
Padres lose two top pitchers to injured list on same day
Fever announce remarkable attendance milestone in fifth 2024 home game
Senators reportedly undecided on qualifying defenseman
Lamar Jackson's curious offseason decision costing him significant money
Blue Jays two-time All-Star pitcher lands on IL for second time this season
Lakers set to benefit from Pelicans’ NBA Draft decision
One rookie quarterback is showing 'elite downfield accuracy' during OTAs