The Philadelphia Eagles defeated the New England Patriots to win Super Bowl LII on Feb. 4. Eagles fans took the streets, light poles and rooftops to celebrate. (Amber Ferguson,Nic Justice,Branden Eastwood/The Washington Post)

— A backup quarterback playing like a Hall of Famer and a fearless coach who somehow made everything work managed to put a major, Super Bowl-size dent into the greatest dynasty in NFL history here Sunday evening.

Tom Brady was at his legendary best for the New England Patriots. But it was the Philadelphia Eagles who emerged as the champions of a wildly entertaining Super Bowl LII, riding the passing of fill-in quarterback Nick Foles and the daring of Coach Doug Pederson to a pulsating 41-33 triumph before a delightedly partisan crowd at U.S. Bank Stadium.

“A lot of people counted us out,” Pederson said of a season in which Foles took over for injured standout Carson Wentz in December. “But that locker room believed in each other, believed in me.”

That belief paid off handsomely as the Eagles won their first Super Bowl title, securing their first league championship since 1960 in the pre-Super Bowl days. They denied the Patriots what would have been a sixth Super Bowl crown with Brady as their quarterback and Bill Belichick as their coach.

“They’re all pretty disappointing,” Brady said of his three Super Bowl defeats. “Losing sucks. You show up and you try to win, but sometimes you lose and that’s the way it goes.”

Brady certainly did his part, throwing for a Super Bowl-record 505 yards and a trio of second-half touchdowns. It was a frantic game in which the two teams combined for 1,151 yards of total offense, breaking the Super Bowl mark in that category by the end of the third quarter.

The Patriots took their first lead of the night in the fourth quarter on Brady’s second touchdown pass of the game to tight end Rob Gronkowski. But the Eagles converted a fourth-and-one gamble by Pederson on their own 45-yard line with less than six minutes remaining.

“I trust my instincts,” Pederson said. “I trust everything that I’m doing.”

Pederson’s team cashed in with Foles’s 11-yard touchdown pass to tight end Zach Ertz with 2:21 to play. The touchdown was upheld after an instant replay review in which it was ruled that Ertz had the football long enough to become a runner, under the rules, before diving into the end zone and having the ball hit the turf. An NFL season filled with “What’s a catch?” intrigue included more in the biggest game of all, and the Eagles benefited twice.

After defensive end Brandon Graham poked the football from Brady’s hand on a sack for a fumble and turnover, Eagles kicker Jake Elliott drilled a 46-yard field goal with 1:05 to go. The Patriots had one last chance, but Brady’s desperation throw into the end zone fell to the turf incomplete as time expired.

“It’s disappointing,” Belichick said, “but I’m proud of the way our team competed. . . . It’s a tough way to end up.”

Foles threw for 373 yards and three touchdowns to cap a wondrous postseason run. He threw touchdown passes to wide receiver Alshon Jeffery in the first half as the Eagles raced to a lead and to running back Corey Clement in the third quarter. Tailback LeGarrette Blount ran for a touchdown, and Foles even had a touchdown catch on a beauty of a trick play dialed up by Pederson.

“I felt good,” said Foles, who was named the game’s most valuable player. “I felt calm. The big thing for me was knowing I didn’t have to be Superman. . . . I was just playing ball.”

Brady threw a touchdown pass to wide receiver Chris Hogan, along with the two to Gronkowski, and the Patriots got a touchdown run by tailback James White. They had to play without wideout Brandin Cooks after he suffered a concussion on a legal first-half hit by Eagles safety Malcolm Jenkins.

Belichick mysteriously benched cornerback Malcolm Butler, a former Super Bowl-saving hero. Belichick did not explain in detail the reasoning behind not having Butler on the field to try to help a defense that was in dire need, saying only that it was a football decision and not a disciplinary move.

“We never really got control of the game,” Brady said. “We never really played on our terms. We didn’t make enough plays when we needed to.”

The Patriots must regroup from here. Gronkowski said after the game that he will ponder his football future in the coming weeks, leaving open the possibility of retirement. He was cleared to play in this game Thursday after suffering a concussion during the AFC championship game on an illegal helmet-to-helmet hit.

Brady said again that he plans to continue playing, but he turns 41 in August. Belichick turns 66 in April, and there was speculation even Sunday that he could walk away from coaching. That, the speculation held, could keep offensive coordinator Josh McDaniels from exiting to become the head coach of the Indianapolis Colts, as expected. Defensive coordinator Matt Patricia is to become the head coach of the Detroit Lions. He did not exactly leave on a high note, as the New England defense was dominated by Pederson and Foles.

Foles was sharp from the outset, to the delight of the decidedly pro-Eagles crowd. The Eagles took control early when Foles teamed with Jeffery for a 34-yard touchdown. Cornerback Eric Rowe, starting for Butler, had good coverage, but Jeffery made a fantastic leaping catch in the back of the end zone.

The Patriots were not quite in sync in the first half. Belichick opted at one point against a fourth-and-one gamble, and kicker Stephen Gostkowski sent the football off the left upright after a mishandled low snap on a 26-yard field goal try. The Patriots had Brady wide open as a receiver on a second-quarter trick play. But Brady could not haul in wide receiver Danny Amendola’s throw, as the football bounced off his hands. Belichick’s fourth-and-five gamble resulted in an incompletion.

The Eagles did far better on their version of throwing a pass to their quarterback — called “Philly Special,” according to Pederson — later in the first half. A fourth-down direct snap to Clement was followed by a toss to tight end Trey Burton, who threw a pass to the open Foles for the touchdown. Foles, unlike Brady, made the catch.

Pederson had his former Green Bay Packers teammate, Brett Favre, address Philadelphia’s players Saturday. Favre warned the Eagles not to let up and not to believe at any point they had the Patriots beaten, or they’d suffer the same fate as the Atlanta Falcons did a year ago when they surrendered a 28-3 lead and succumbed in overtime.

And while the Eagles gave up the lead Sunday, they regrouped and did not allow the Patriots to add to their collection of Lombardi Trophies. They joined the New York Giants as the only teams to beat Brady and Belichick in a Super Bowl. The Giants did so twice.

“In games like this against a great opponent,” Pederson said, “you have to make those tough decisions that way and keep yourself aggressive.”