The Patriots and the Chiefs certainly had their hands full Sunday with previously unbeaten opponents, but they remain on an unbeaten collision course in the AFC.

The top two teams in The Post’s weekly NFL Power Rankings both went down to the closing seconds to record their respective fourth straight wins to open the season.

New England came up with a key defensive stand on Buffalo’s final drive, picking off Bills backup Matt Barkley with 1:27 remaining for a 16-10 win, improving to 4-0 for the fifth time in the Bill Belichick era.

Kansas City also remained perfect, with Patrick Mahomes leading a 78-yard drive for the go-ahead score with 20 seconds to go to hand the Lions (2-1-1) their first loss of the season, 34-30, in Detroit.

“It shows how you fight through the adversity,” said Mahomes, who didn’t throw any touchdown passes for only the third time in 21 regular-season NFL starts. “In this league, it’s not always going to be pretty. It’s not always going to be 50 points and three-touchdown wins. You have to find a way to win these games against great teams.

“For us, we know that this win and not playing our best football, is going to help us tremendously down the road.”

The Chiefs lost at home to New England in overtime in last year’s AFC Championship Game, but they continue to steamroll toward the rematch — for AFC regular-season supremacy, at least — with a showdown in Foxborough, Mass., slated for Dec. 8.

Tom Brady also didn’t throw for any touchdowns Sunday against a stingy Bills defense, completing just 18 of 39 passes for 150 yards. He also was picked off in the end zone by Micah Hyde late in the second quarter.

But Matthew Slater scored for New England on a blocked punt and the Pats’ D mostly limited Josh Allen before Jonathan Jones knocked out the second-year quarterback with a helmet-to-helmet blow in the opening minute of the fourth quarter.

Allen totaled just 60 passing yards in the first half, although his 1-yard scoring leap early in the third had drawn Buffalo within 13-10. It also marked the first touchdown allowed this season by New England’s defense, which was playing without linebacker Donta Hightower (shoulder).

Bills coach Sean McDermott curiously bypassed a chip-shot field goal with nearly 11 minutes remaining, and Barkley turned the ball over on downs with an incompletion in the end zone on fourth-and-goal from the 3-yard line.

Buffalo’s defense held again, but Barkley was crushed by linebacker Kyle Van Noy on third-and-9 from the New England 39 for an easy interception — the Pats’ fourth of the game — by Jamie Collins with 1:27 to go.

Brady improved to 16-2 in his career in Orchard Park, more wins at the Bills’ home stadium than any Buffalo quarterback has totaled over that span.

“It was a tough football game. We stepped up and showed a lot of physical and mental toughness in this game,” Belichick said. “The Bills are a good football team. We knew that’s what it was going to take here. … Our guys stood up and made a few plays. It was good to get a division win on the road.”

The back-and-forth shootout between the Chiefs and the Lions easily was the early game of the day, featuring five lead changes in the second half.

Matthew Stafford’s 6-yard touchdown pass to Kenny Golladay, the receiver’s second score of the day, gave the Lions a 30-27 lead with 2:31 left in the fourth.

Mahomes kept the winning drive alive by converting a fourth-and-8 with his legs, however, finishing 24-for-32 for 315 yards with no touchdowns and his fourth straight game with no interceptions. Darrell Williams’ second 1-yard plunge of the final quarter, this one with 20 seconds left, enabled the Chiefs to become the first team since the merger to open a season 4-0 with three road wins in back-to-back seasons.

Among the league’s other unbeaten teams through Week 3, Green Bay lost Thursday night to Philadelphia, and the Rams dropped their first game of the season Sunday, a wild 55-40 shootout to Tampa Bay.

Dallas fell to 3-1 at New Orleans on Sunday night, and 3-0 San Francisco had a bye.

Who Beat ‘Dem Cowboys?

Teddy Bridgewater and the Saints now have knocked off two previously unbeaten teams without Drew Brees, following up last week’s impressive win against Seattle with a defensively tight 12-10 edging of Dallas on Sunday night in New Orleans.

Wil Lutz nailed four field goals and the Saints’ defense held Dallas to just 257 net yards to send the Cowboys to their first loss of the season after wins over the pre-Daniel Jones Giants and the combined 0-8 disasters that are Washington and Miami.

Ezekiel Elliott scored the lone touchdown in the third quarter for Dallas for a 10-9 lead, but Zeke ran for just 35 yards on 18 carries. Lutz kicked a 26-yarder early in the fourth to retake the lead, and the Saints picked off Dak Prescott’s last-gasp Hail Mary heave to improve to 3-1.

Bridgewater, who has filled in for Brees since the future Hall of Famer injured his thumb in Week 2, completed 22 of 30 passes for 193 yards and one interception.

What Can The Browns Do For you?

Cleveland’s inconsistent start continued with another upturn, tying Baltimore for the AFC North lead at 2-2 with a 40-25 victory, the Browns’ first road win against the Ravens since 2015.

Baker Mayfield, publicly criticized by Rex Ryan this past week, led a 531-yard offensive attack with 342 yards through the air, albeit with just two completions to Odell Beckham Jr. for 20 yards. Nick Chubb ran for 165 yards and three scores and Jarvis Landry caught eight balls for 167 yards, although he did not return to the game after suffering a concussion in the third quarter.

The Browns defense added four sacks and forced three turnovers — two picks of Lamar Jackson plus a Mark Ingram fumble.

The game also featured some familiar drama involving OBJ, who got into a shoving match with Baltimore cornerback Marlon Humphrey in the third quarter. Both players received offsetting penalties for unsportsmanlike conduct.

Burfict, Still Not Perfect

Oakland linebacker and longtime NFL bad boy Vontaze Burfict is at it again, ejected from Sunday’s 31-24 win over Indianapolis for a late helmet-to-helmet hit on Colts tight end Jack Doyle.

Burfict already had a lengthy history of ejections and fines for dirty play over seven seasons with Cincinnati. He has been fined or suspended 13 previous times, reportedly amassing $4.12 million in fines.

Doyle was attempting to regain his footing after making a third-quarter catch when Burfict, somehow a team captain for the Raiders, lowered his head and clocked the tight end in the helmet. Burfict also had exchanged punches with Minnesota players last week.

Bad Beat

Stephen Gostkowski’s missed PAT in the first quarter, his fourth of the season, ended up being the difference in the Bills covering the seven-point line against the Patriots.

The Hurt Locker

In addition to Allen and Landry, quarterback Mitch Trubisky left the Bears’ 16-6 win over Minnesota with a left shoulder injury in the first quarter, before returning to the sidelines later in the game with a sling on his left arm. Rookie tight end T.J. Hockenson, the eighth-overall pick in the draft, suffered a concussion in Detroit’s loss to the Chiefs. Texans wide receiver Kenny Stills left their 16-10 loss to Carolina with a hamstring injury.

Post Patterns

Frank Gore’s 109 rushing yards against New England gave him 15,021 for his career, joining Emmitt Smith (18,355), Walter Payton (16,726) and Barry Sanders (15,269) as the only backs in NFL history to reach the 15,000-yard mark. … Another future Hall of Famer, Arizona wide receiver Larry Fitzgerald, caught five passes in the Cardinals’ 27-10 loss to Seattle to pass Tony Gonzalez for second all-time with 1,326 receptions, 223 behind leader Jerry Rice. … Cornerback Bashaud Breeland had a 100-yard fumble return for a touchdown in the Chiefs’ win over Detroit. … Edge rusher Jadeveon Clowney, acquired in the preseason from Houston, scored on a 27-yard pick-six for the Seahawks. … Cornerback Jalen Ramsey, who requested a trade earlier this month from Jacksonville, was inactive in the Jaguars’ last-second 26-24 win over Denver. Leonard Fournette ran for 225 yards and Josh Lambo hit a 33-yard field goal as time expired for Jacksonville. … Christian McCaffrey had 179 total yards and Kyle Allen threw for 232 in Carolina’s 16-10 win over Houston. … Marcus Mariota threw for 227 yards and three touchdowns in Tennessee’s 24-10 win in Atlanta. … Winless Miami briefly enjoyed its first lead of the season, but Philip Rivers threw for 310 yards and two touchdowns in a 30-10 Chargers victory. … Running back Austin Ekeler added his fifth touchdown in four games for the Bolts, whose defense held Josh Rosen and the Dolphins to 36 yards in the second half. … The Bears defense recorded six sacks of Kirk Cousins and held NFL rushing leader Dalvin Cook to 35 yards in a 16-6 victory. Trubisky was replaced by backup Chase Daniel on the first drive of the game. … Two of Jameis Winston’s four touchdown passes went to Chris Godwin, who had 12 catches for 172 yards for Tampa Bay. … Jared Goff threw for 517 yards, tied for the eighth-most all-time, on 68 pass attempts (tied for third-most) in the loss for the Rams.

Three Star

1.Nick Chubb, Browns running back

The former Georgia star ran for 165 yards and a career-high three touchdowns, including an 88-yard burst in the fourth quarter, in Cleveland’s 40-25 win over Baltimore.

2. Christian McCaffrey, Panthers running back

McCaffrey totaled 179 of Carolina’s 297 offensive yards (93 rushing and 86 receiving) as the Panthers won their second straight game without Cam Newton, 16-10, over Houston.

3. J.C. Jackson, Patriots cornerback

The third-year DB had two of the Patriots’ four interceptions and also blocked a punt, resulting in a Matt Slater touchdown, in a 16-10 win over Buffalo.

Quote of the Day

“I’m just mad I lost my earring.”

— Odell Beckham Jr., who had only two catches for 20 yards, on his second-half shoving match with Baltimore CB Marlon Humphrey in Cleveland’s win over the Ravens.

Fantasy Insanity