A day after a Don Kelly decision backfired when he pinch-hit for the hottest bat in his lineup, the Pittsburgh Pirates manager took another strategic risk against the Washington Nationals.

Knowing the Nationals could load the top of their lineup with left-handed hitters, Kelly opted to use lefty reliever Mason Montgomery as an opener instead of starting righty Carmen Mlodzinski.

This move worked wonders.

After Montgomery got through the top of the order, Mlodzinski tossed six scoreless innings as the Pirates scored their second shutout of the season with a 2-0 win Wednesday night before 11,244 at PNC Park to take the lead in the four-game series.

It was the equivalent of a quality start in relief.

“It was great. We talked about him as a competitor, but then talking about him as a teammate and the selflessness to go out in the ’pen and come in behind Mason,” Kelly said. “When we talked the other day, I think any starting pitcher would prefer to start the game, and his mindset going into it was whatever we feel is best and gives us the best chance to win. I think he showed that in the outing.”

Left-handed hitters were batting .355 with an .813 OPS against Mlodzinski this season, so the strategy made sense. He also has experience as both a starter and reliever for the Pirates and found the perfect pocket to get through the Nationals lineup twice without incident.

Mlodzinski became the sixth Pirates pitcher to allow two or fewer hits in six scoreless innings of relief in the expansion era (since 1961), joining the company of Harvey Haddix (1961), Al McBean (1963), Vernon Law (1966), Dock Ellis (1968) and Bob Johnson (1972). Mlodzinski also is the first Pirates reliever to pitch at least six scoreless innings, regardless of hits allowed, since Steve Cooke tossed seven scoreless against the St. Louis Cardinals on Sept. 21, 1992.

“It’s cool any time you go six innings, and you give up two or less runs,” Mlodzinski said. “It felt good to be efficient.”

The result was reaffirming for Kelly. The night before, he drew criticism for having Nick Yorke pinch-hit for Brandon Lowe — who had four home runs and 11 RBIs in a three-game span — with one out and the bases loaded in the seventh inning of a 5-4 loss to the Nationals.

“I just see a bunch of guys that are showing up every day to compete and win on that day, not worried about the day before,” Kelly said. “How it went — whether it was good, bad, indifferent — they’re showing up, having fun, working hard every day. … It was really cool to see.”

Acquired from Tampa Bay, along with Lowe and Jake Mangum, Montgomery was efficient in his first MLB career start by throwing nine of 11 pitches for strikes in the first inning for his fourth consecutive scoreless outing. He gave up a one-out double to Curtis Mead, who reached third on Daylen Lile’s groundout to second, but struck out Brady House on an elevated 98.5 mph fastball.

“I was able to get in there and do my job. I think that’s the important part, right?” Montgomery said. “I stuck to the plan and was able to retire the guys.”

The Pirates took a 2-0 lead in the first inning against Nationals right-hander Jake Irvin, who struck out the first two batters he faced before walking Bryan Reynolds and giving up a jam-shot single to Ryan O’Hearn. Marcell Ozuna hit a line drive to right field to score Reynolds for a 1-0 lead, marking his second consecutive game with an RBI.

Then the Pirates took advantage as O’Hearn scored on an infield single by Nick Gonzales when shortstop CJ Abrams made the throw to first base instead of opting for the forceout at second. Irvin then hit Spencer Horwitz with a pitch to load the bases for Yorke, who grounded out to first to end the inning.

Mlodzinski entered in the second inning and hit Abrams with a pitch, then retired the next eight batters. Mlodzinski had runners on first and second in the fifth but got a flyout and forceout.

Of his 81 pitches, 55 were for strikes as Mlodzinski relied on his splitter and four-seam fastball for seven of his 14 called strikes and seven of his nine whiffs. He also kept the Nationals off-balance by mixing in a sinker, sweeper and curveball.

“He definitely showed that it didn’t matter for him,” said Montgomery, who watched the rest of the game from the clubhouse. “Whatever the team needed, and he had the team’s best interest in mind. He went out there and shoved, like he has been, and it worked out.”

The Pirates had a pair of runners in scoring position with two outs in the fifth inning, but Irvin got Ozuna swinging on a 2-2 slider to escape unscathed. Abrams doubled in the sixth, but Mlodzinski responded by getting Joey Wiemer swinging at an inside sinker to end the frame.

After Gregory Soto pitched a clean eighth, Dennis Santana hit Abrams with a pitch with one out in the ninth to bring the tying run to the plate. But Santana got pinch hitter Nasim Nunez to line out to center, then got Drew Millas to fly out to right to earn his second save.

After the pitching plan worked to perfection, Mlodzinski said he wouldn’t be opposed to coming on in relief again if Kelly opted to use an opener instead of a traditional starter.

“I’m going to do whatever they ask me to,” Mlodzinski said. “I think it’s a reality check for me. I need to be better against left-handed batters. I want to progress as a pitcher and be able to handle both sides of the plate equally. Especially as a starting pitcher, it’s super important. I don’t want to just be a matchup-based pitcher. … Nothing’s going to surprise me. It’s just making sure I’m prepared, which I was going into this one for sure.”