The Bruins got one of their stars back on Tuesday, but the team’s grinders delivered them their third straight victory.

After the B’s shook off a messy first period, Mark Kastelic and Fraser Minten each scored a pair of goals to lead the B’s to their second win over former coach Jim Montgomery’s Blues, 5-2, in St. Louis. Jeremy Swayman made 24 saves for the win and Sean Kuraly had a pair of helpers.

The B’s lost a one-goal lead early in the third period but then scored the next three goals to earn the two points to start their three-game win streak. They face the Jets in Winnipeg on Thursday.

The Bruins welcomed back David Pastrnak (two assists) after he missed five games with an unspecified injury and coach Marco Sturm started him off on a line with rookie Minten and Marat Khusnutdinov.

“Just three young kids playing together. It was fun,” a smiling Pastrnak told reporters in St. Louis. “With Khusy there’s so much speed and the capability of being so strong on the puck for his size, it’s unbelievable. With Minty, for being such a young player, being so early in his career, it’s amazing to see. He’s a great 200-foot player. We had a couple of looks early in the season though we didn’t have any practices together. But at the same time I know what to expect from them. It was just trying to make them feel comfortable and don’t change anything about their game.”

The creation of that line caused the somewhat surprising break-up of the effective identity third line with Kastelic, Minten and Tanner Jeannot. But the two big wings dropped down to play with Kuraly and not much changed for them. Unlike his linemates, Jeannot somehow missed getting on the scoresheet but he was all around the action. He doled out a stunning nine of the Bruins’ 26 hits.

“It’s a good thing now. We have a lot of choices. Everyone is getting back healthy,” Sturm told NESN. “I went with my guts a little bit and I thought that lineup today gives us the best chance. But having said that, I have to mention it because I mentioned it to the guys, too. Some guys had to drop a line, like Jeannot and Kastelic and look what they did today. That to me, that’s character. That’s what we want. They didn’t complain or anything. They just got the job done.”

But for the first time in three games, the B’s found themselves with a deficit in the early going.

The B’s were not sharp in the first and needed Swayman to come up with a big save right off the bat on the first shift off a turnover.

Then Nick Bjugstadt got behind everyone for a partial breakaway and Pavel Zacha slashed him to give the Blues the first power play of the game. It could have been a penalty shot but it didn’t matter because the Blues cashed in at 5:27. Robert Thomas one-timed a Pavel Buchnevich pass from the high slot and, with some aid from a Jonathan Aspirot screen, the B’s were down 1-0.

Swayman came up with a couple more big saves, the best being a glove snare on Colton Parayko snap shot from the slot.

At the end of the first, coach Marco Sturm put Pastrnak back on the top line with Morgan Geekie and Elias Lindholm and the group earned a power play with four seconds left in the period when Geekie took a high-stick from Bjugstadt.

But the advantage finished the same way as their first one did — unsuccessfully — despite Geekie hitting a post. Kastelic would also hit iron on the shift after the PP.

But the B’s started to find the range in the second period and began peppering goalie Joel Hofer with shots.

Hofer was playing better than Jordan Binnington had played in Boston last week, but the B’s would eventually get the equalizer at 12:48.

The Pastrnak-Minten-Khusnutdinov line was reunited in the second period and all three forwards crashed the net. Hofer stopped Pastrnak and then Khusnutdinov before Minten came from behind the net and swept it home for his fifth of the season.

After Sturm’s new “third” line scored, his new fourth line gave them their first lead at 14:34. Jeannot collected a Kastelic rim pass and sent it back to Victor Soderstrom at the right point. Soderstrom walked the puck to the middle of the ice and fired a shot that Sean Kuraly tipped and it went off Kastelic past Hofer for his fifth of the year and Soderstrom’s first point as a Bruin.

The B’s maintained their lead into the second intermission after outshooting the Blues, 13-3, in the second period but barely averted disaster on the the final shift. A puck bounced off the end boards and came out for Jake Neighbours, who had an empty net. But his backhander went off Hampus Lindholm’s skate and out of danger.

But they could not hold the lead. After Hofer robbed Minten at one end, the Blues tied it at 4:51 of the third. Andrew Peeke tried to shovel a pass behind the net to Hampus Lindholm but Buchnevich stole it and fed Thomas in front for his second of the game.

But the  B’s regained the lead at 8:01. After Kuraly and Kastelic won a puck behind the net to get it out to Nikita Zadorov at the outside of the left circle, the big defenseman fired it back into the crowd at the crease. It hit Kuraly and dropped down for Kastelic to knock it home.

“I played with Kurls for the first 20 games or so and I’m definitely familiar with how he plays. I love playing with him, very effective, simple and just a good communicator,” said Kastelic. “Me and Tanner we just tried to continue to do our thing. Our style of games really compliment anybody so I think there was chemistry right away so it was fun playing with him tonight.”

Then the so-called third line went back to work. After a Peeke shot went off the post, it caromed off the boards and into the slot, where Minten one-timed a slapper for his second of the night a 11:33, his first career two-goal game.

With the net empty late in the game, Pastrnak hit the post but he chased it down, won a battle for the puck and got it over to Elias Lindholm, who fed Zacha for the freebie with 1:41 left, his eighth of the year.