– Monday’s game between the Wild and New York Rangers was perfectly suited for the Broadway stage that is Madison Square Garden.

It had drama, villains and riveting action.

There were ejected players, dirty plays, injuries and ghastly Wild power plays (what else is new?).

The Wild overcame all of that … for 40 minutes. But on Broadway, there are often shocking plot twists, and this one had a very bad ending for the Wild — a complete collapse en route to a 5-4 defeat.

The Rangers, after not being able to keep up with the Wild at even-strength in the first two periods, stormed back from a 3-0 deficit when Darcy Kuemper gave up five third-period goals — one more than he had allowed in five previous starts.

“That’s on me. You don’t let in five goals in the third. You just don’t do that,” Kuemper, looking shellshocked, said after the stunning loss. “Yeah, it happened.”

No, that wasn’t a bad dream.

For the first time since January 2004, the Wild gave up five goals in a period. It was the first time the Rangers won by rallying from a three-goal deficit entering the third period since Feb. 21, 1992, coincidentally against the North Stars.

“This is our home ice and we are going to show the fans just how much we want to win,” Rangers goalie Henrik Lundqvist said after the leaders spoke up during the second intermission.

Down 3-0, the Rangers pushed hard and “We just let them keep pushing. We didn’t push back,” said coach Mike Yeo, who called the loss inexcusable. “We have to push this behind us, but we have to learn. I mean, this is twice already this year where we’ve blown third-period leads.”

The first time in Anaheim, the Wild only blew a one-goal lead. This one came out of nowhere after the Wild, other than its inoperative power play, controlled 40 minutes.

In fact, after two periods, it looked like the Wild would march to its fourth shutout in seven games. But suddenly, the Rick Nash-Derick Brassard-Mats Zuccarello line took over. The three forwards were part of four of the Rangers’ five goals.

“We stopped playing. We played soft,” defenseman Jonas Brodin said.

“We just sat back and they picked us apart,” defenseman Ryan Suter said.

“We started backing up, letting them beat us to loose pucks,” Yeo said. “We’re a pressure team, we’re an aggressive team. We want to dictate play. We just let them come at us.”

By 4:48 of the third, Kevin Klein and Nash made it 3-2. Wild leading goal scorer Jason Zucker looked to settle things down with his fifth goal to make it 4-2, but Kuemper, flirting all night with puck-handling gaffes, committed a costly one and Brassard scored off Carl Hagelin’s rebound off the post.

With the Wild barely hanging on, Anthony Duclair scored his first NHL goal by handcuffing Kuemper. The shot off the wing squeezed through the armpit and dribbled in. It was a bad goal, but the Wild wouldn’t escape to overtime. With Kuemper and the Wild rattled, 37 seconds later and with 3:11 left, Zuccarello scored the winner.

“It was just in bunches,” Suter said. “It’s tough to get that momentum. They just kept getting pucks in behind us and we couldn’t get a handle on it.

The Rangers’ Chris Kreider was booted for boarding Brodin, who hurt his hand but returned, and John Moore was assessed an intent-to-injure match penalty for launching his elbow into Erik Haula’s head, who didn’t return.

The Wild’s 0-for-24 power play couldn’t score on either major, but in between, Justin Fontaine set up Nate Prosser and Matt Cooke 55 seconds apart and Mikael Granlund set up Jason Pominville. Zach Parise also survived a scare when he took an errant stick to the face.

Yet the Wild impressively played, as Cooke said, “played pretty dang good hockey.” And then? Meltdown.

“You know it’s happening and someone’s got to lead the way, pull the reins and turn the cart the other direction,” Cooke said. “Didn’t happen tonight.”