On Football analyzes the biggest topics in the NFL from week to week. For more On Football analysis, head here.

The NFL’s last two undefeated teams beat themselves.

The San Francisco 49ers and Philadelphia Eagles struggled on the road against inferior opponents with backup quarterbacks and tough defenses.

That allowed Larry Csonka and his teammates from the 1972 Miami Dolphins to pop the champagne bottles in October. They’ll remain the only perfect team in league history for at least another year.

The Buffalo Bills, the NFL’s biggest favorite so far this season, also had problems on Sunday facing a losing team and a backup quarterback but they held on at the 1-yard line for a 14-9 win over the New York Giants.

Brock Purdy looked ordinary without his top two playmakers in San Francisco’s 19-17 loss at Cleveland. Jalen Hurts made a critical mistake in Philadelphia’s 20-14 loss to the Jets.

But there was plenty of blame to go around.

Despite Purdy’s poor performance – his first in 14 career starts, including playoffs – the 49ers (5-1) were in position to win the game at the end. However, rookie kicker Jake Moody missed a 41-yard field goal with six seconds remaining.

“It’s always tough to miss that last kick but that happens in football,” 49ers coach Kyle Shanahan said. “They played better than us today and that was the last play but there was a lot more today than just that.”

The game shouldn’t have come down to a field goal for the 49ers, who came in averaging 33.4 points and 402.6 yards. The Browns held San Francisco to just 215 yards and Purdy had a 55.3 passer rating – less than half his career mark of 114.4.

The 49ers couldn’t overcome losing all-purpose stars Christian McCaffrey and Deebo Samuel to injuries. Give credit to the Browns and their top-ranked defense. Myles Garrett and the rest of defensive coordinator Jim Schwartz’s crew have been staunch most of the season. They helped Cleveland get the win despite two interceptions by P.J. Walker, who started for Deshaun Watson.

“You get opportunities and you’ve got to take advantage of them. There were definitely some throws and opportunities there for me that I missed,” Purdy said. “It’s something I’ve got to learn from. We’ve all got to look at ourselves in the mirror and see the flaws and get better from it. That starts with me.”

The Eagles (5-1) committed four turnovers and couldn’t take advantage of a defense missing starting cornerbacks Sauce Gardner and D.J. Reed. Hurts’ third interception came right after the two-minute warning with Philadelphia clinging to a 14-12 lead. Hurts said he made the wrong read on the play when he threw into double coverage to New York’s Tony Adams, who returned it to the 8 to set up Breece Hall’s go-ahead TD run.

Hurts and the Eagles had a chance at redemption with 1:46 but Hurts threw three incomplete passes, including a deep ball on fourth-and-8 that was nearly picked.

Philadelphia’s reliable kicker Jake Elliott also missed a 37-yard field goal earlier in the fourth quarter after making 16 of 17 to start the season.

“You turn the ball over four times you shouldn’t expect to win,” Hurts said. “It’s an opportunity to look ourselves in the mirror and respond and I have confidence that this team will do so.”

Zach Wilson played error-free ball to become the first quarterback to lead the Jets to a victory over Philadelphia in 13 meetings between the two franchises.

The Giants (1-5) had a shot to pull off the biggest upset of the season but Tyrod Taylor threw incomplete to Darren Waller from the 1 on the final play of the game. New York wouldn’t have needed a touchdown at that point if Taylor managed the clock better at the end of the first half.

Taylor appeared to audible to a run play at the Bills 1 with 14 seconds left. Saquon Barkley was stopped for no gain and the Giants had no timeouts remaining. Coach Brian Daboll was livid with Taylor. Missing out on three points at that point ended up costing New York at the end.

While the Eagles and 49ers suffered their first losses, the Dolphins and Detroit Lions both improved to 5-1.

The Dolphins fell behind winless Carolina 14-0 before Tua Tagovailoa, Tyreek Hill and a dynamic offense exploded for a 42-21 win.

Jared Goff was impressive in Detroit’s 20-6 win at Tampa Bay. Goff threw for 353 yards and two TDs against a difficult defense.

“We know who we are right now and we feel like we can beat anyone,” Goff said.

In the NFL, any team can beat its opponent every week. Sunday was further proof.

AP NFL: https://apnews.com/hub/NFL