– The Wild has figured out some of the best competition in the NHL this season, upending the likes of the Penguins, Golden Knights and Predators.

But the second-to-last team in the Western Conference has remained an anomaly.

Until Friday.

In its third crack at the Canucks after going 0-1-1 in previous tries, the Wild finally emerged victorious with a 5-2 win in front of 17,918 at Rogers Arena that hauled momentum with the team to Edmonton where it’ll complete a back-to-back Saturday against the Oilers.

“For the most part, we carried a lot of the momentum,” center Eric Staal said. “As the game went on, we got better and spent a lot of time in the offensive zone and were rewarded and got the job done.”

It took a teamwide effort to solve the puzzle that had been the Canucks.

Four lines contributed offensively, 12 different players tallied a point and goalie Devan Dubnyk posted 30 saves in his 30th win of the season to help the Wild reinstate its three-point lead over the Stars for the third seed in the Central Division after Dallas won earlier in the night.

Staal broke a 2-2 tie with 4 minutes, 22 seconds remaining in the second period when he converted his team-leading 37th goal of the season to move into sole possession of fourth in the NHL’s goal-scoring race.

“Right now they’re going in,” Staal said. “So it’s a nice feeling.”

VideoVideo (00:36): Coach Bruce Boudreau discusses the 5-2 win over the Canucks.

A centering attempt from winger Mikael Granlund was redirected in by Staal to settle a back-and-forth tug of war that lasted for much of the first two periods.

Vancouver had the leverage early, scoring just 53 seconds after puck drop. Defenseman Michael Del Zotto gobbled up his own rebound after it squeaked through Dubnyk’s legs and skated around the net for a wraparound with Dubnyk froze in position after the initial save.

Only 49 seconds later, the Wild delivered the equalizer when winger Zach Parise’s shot from a poor angle slipped by goalie Anders Nilsson to extend Parise’s point streak to six games.

After the Canucks had a goal waved off late in the first because the puck was kicked in, center Matt Cullen put the Wild ahead after deking around Nilsson just 2:46 into the second after accepting a pass from winger Tyler Ennis.

VideoVideo (00:44): Sarah McLellan recaps the 5-2 win over the Canucks in her Wild wrap-up.

It was Cullen’s 10th goal of the season, a plateau he’s reached in 16 of his 20 NHL seasons. The veteran ended up with a season-high seven shots.

“It was nice to get one,” Cullen said. “It was a great pass by Tyler.”

But that 2-1 lead didn’t last long. At 7:51, the Canucks tied it when winger Jussi Jokinen buried a rebound off an Erik Gudbranson shot — a goal that was upstaged later in the period by Staal’s fourth game-winner of the season; it came against Nilsson, who finished with 31 saves for Vancouver.

The Wild went 0-for-2 on the power play, while the Canucks were 0-for-1.

Coyle added an empty-netter with 44 seconds remaining off a setup by Cullen, a fitting finish considering that line was dynamic the whole game.

Winger Marcus Foligno scored a fifth goal with 14 seconds left.

“That might have been Matt Cullen’s best game this year for us,” coach Bruce Boudreau said. “He generated all the play, Ennis was good, and Charlie was Charlie. So I thought they were good because we needed them to be good.

“You can’t win in this league continually unless you have all three or four lines going.”