From the moment the NHL schedule was released, the Wild knew the first three weeks of the season would pose a unique challenge. Five of its first six games were on the road, and they were spread out over 17 days, making it hard to get into the rhythm of regular competition.

By the time the Wild limped into Calgary on Saturday, it was sagging under the weight of multiple injuries, a sketchy defense and a string of third-period letdowns. It got just the tonic it needed with a 4-2 victory over the Flames. While the team still has work to do, the win allowed it to close that opening stretch with renewed confidence, in time for its longest homestand of the season.

The Wild followed a familiar routine Saturday, falling behind in the third period after a series of mistakes. This time, it pulled out a late rally with pluck and persistence. With the next six games at Xcel Energy Center, beginning with Vancouver on Tuesday, the Wild hopes to carry that forward.

“[The victory] was huge,’’ said goaltender Alex Stalock, whose magnificent performance kept the Wild afloat until the offense gathered steam. “And the way we did it, too, to come from behind. It’s like the pattern we’ve had since the beginning of the year, and finally, the guys were like, ‘Screw it.’

“It was good to see the way we bounced back. That’s what we talked about, to get to .500 and head back home. Now it’s time to go take care of home ice.”

Saturday’s victory ended a two-game winless streak and came on the second night of back-to-back games. Friday, the Wild lost 4-3 at Winnipeg, marking the fifth time in six games that it led or was tied in the third period and failed to win.

Coach Bruce Boudreau said after that game that his team seemed to be “afraid to win.’’ He advised some soul-searching, which the Wild took to heart late in Saturday’s game.

In his first start in two weeks, Stalock set the tone with 18 first-period saves — making several of those after losing his stick on an early Flames power play. After Chris Stewart put the Wild ahead 1-0 with his sixth goal of the season, a chain of mistakes in the second and third periods put the team on course for another unhappy ending.

Calgary’s Troy Brouwer pounced on a puck that bounced past Ryan Suter, setting up Sean Monahan’s tying goal with 27.5 seconds left in the second period. Boudreau unwisely challenged the goal, contending the Flames were offside. He lost, and under new NHL rules, that drew a minor penalty for delay of game.

Then Suter was assessed a slashing penalty that gave the Flames an extended two-man advantage. Kris Versteeg’s goal gave the Flames their first lead, but the Wild responded with a burst of energy that led to goals by Suter and Jared Spurgeon.

“I don’t know what clicked,’’ said Suter, who also had two assists. “When we started to play with a little confidence, hold onto the puck and make some plays, it started to get into the game we wanted to play.

“We’ve had some terrible third periods. We’ve had leads with 10 minutes to go, and we find a way to lose. For us, it was important to have a good third period, and we talked about it before the third. We found a way to battle back, and that’s what good teams do.’’

The Wild made strides in other areas Saturday, too. Its penalty kill, which entered the game ranked 30th of 31 teams, preserved the victory by shutting down a Flames power play with less than four minutes left. Forward Luke Kunin, playing in his third NHL game, had his best performance yet; he finished with four hits and two assists, and he shined on that final penalty kill.

Boudreau cautioned that things are not automatically easier just because the Wild is playing at home for two weeks. With opponents such as Chicago and Pittsburgh on the docket, it’s just a different kind of test.

“We’ve got to use it to our advantage,’’ Boudreau said. “This game and this feeling, going back home with six in a row at home, you’ve got to make hay when the sun shines. This is our opportunity to get over .500 and put some distance between us, even though we’re playing some pretty good hockey clubs.’’

Player moves

Kunin, Zach Mitchell and Cal O’Reilly were reassigned to the Wild’s AHL affiliate in Iowa on Sunday. Mikael Granlund (groin) could rejoin the lineup soon, but the shorthanded Wild will need to call up more forwards before Tuesday’s game.