What should have been a Wild layup was way too close for comfort. But two points is two points, and in the end, red-hot Nino Niederreiter and the Wild’s surging power play came through to help pull out a 4-3 nail-biter over the Arizona Coyotes on Thursday night.

The Wild, which has nearly double the number of points as the Coyotes, was facing a backup goalie and what should have been a tired opponent playing for the fifth time in seven nights, the second time in 24 hours and reeling with 12 losses in 14 games.

Even Vegas had the Wild such favorites, you had to lay $370 to win $100.

But for the second time in two home games, the Wild surrendered a two-goal lead. This time, one game after losing to New Jersey, the Wild found a way to improve to a league-best 18-2-1 since Dec. 4 and avoid two regulation losses in a row for only the second time this season.

“We had a couple lapses, and they capitalized,” said veteran Eric Staal, who opened the scoring with his 16th goal. “I don’t care who you play against in this league, it can happen. But we found a way to get the win, which is huge in our building.”

After Chris Stewart gave the Wild a 3-1 lead with 3:29 left in the second period, Arizona tied the score in 53 seconds on goals by Jakob Chychrun and Jamie McGinn.

But 23 seconds after McGinn tied it, Jason Zucker got into a skirmish with Laurent Dauphin, and captain Mikko Koivu tangled with 19-year-old Lawson Crouse, the 6-4 11th overall pick in the 2015 draft.

Stewart wasn’t pleased and taught the teenager a lesson early in the third. “I’m big on respect in this league, and I didn’t like the way that went down,” Stewart said.

Coach Bruce Boudreau felt the fight made the Wild “play bigger” in the third. He also said, “Them scoring two goals late, as mad as I was, was probably good for us because it woke us up for the third period.”

Finally, after captain Shane Doan hooked down Zach Parise, Niederreiter, who gave the Wild a 2-1 lead in the first period with a power-play goal and also assisted on Staal’s tally, buried a slot redirection of Mikael Granlund’s setup for his 14th goal and career-high-tying sixth power-play goal. It came at 12:54 of the third.

The Wild’s power play has converted on 31.9 percent of its attempts the past 16 games. Thursday, Boudreau started with the second unit on all four tries.

“I feel like we have two very good power-play units,” said Niederreiter, who has five goals in the past five games. “Whichever is hot is the one he puts out there.”

With Jonas Brodin injured, Jason Pominville, who has played the power-play point most of his career, slotted in. Two of his three assists against the Coyotes came on the power play.

“It’s an area where I feel really comfortable,” Pominville said. “I was able to slip in pretty good.”

Pominville also sprung Stewart for a silky-smooth breakaway goal before Arizona’s quick comeback.

Dubnyk, who didn’t give up more than three goals in his first 27 starts, has allowed three or more goals in five of eight starts since. Back then, he had a 1.58 goals-against average and .947 save percentage. In the past eight starts, Dubnyk has allowed 23 goals (2.89 GAA) and has an .894 save percentage.

Despite Dubnyk’s statistics slipping, the Wild is 6-2 in those starts.

“I didn’t think he was extremely on in the first two periods like a lot of the players, but in the third period, he had to make some big saves and he did,” Boudreau said. “That’s what you want your No. 1 goalie to do.”

The Wild improved to 12-0-2 in its past 14 against the West. However, after allowing 60 goals in the first 32 games (1.88 goals per game), the Wild has allowed 37 in the past 12 (3.08).

“We have to be way sharper than we were,” Niederreiter said.