For all of the fuss about moving Carmen Mlodzinski to a relief role instead of Bubba Chandler in the shakeup of the starting rotation, both ended up pitching out of the bullpen anyway.

The Pittsburgh Pirates made a late scratch of Chandler for his scheduled start in the series finale Sunday against the Atlanta Braves, as manager Don Kelly opted to use lefty reliever Mason Montgomery as an opener.

For six innings, the plan worked to near-perfection.

Chandler recorded seven strikeouts in five scoreless innings before leaving with one out and the bases loaded in the seventh — only for pinch hitter Michael Harris II to deliver a three-run double off Evan Sisk to boost the Braves to a 3-2 win and series sweep at Truist Park.

“Coming out of the bullpen is a lot different. A little different adrenaline, not like coming into the game that just started,” Chandler said on the SportsNet Pittsburgh postgame show. “I can’t let stuff affect me. My best pitches beat those two hitters that I walked. I’m not happy about that.”

The Pirates took a 1-0 lead when Spencer Horwitz hammered a full-count slider 411 feet to right field for a leadoff home run, his third of the season and fourth of his career. In nine career games in Atlanta, Horwitz is 14 of 25 (.560) with six home runs.

Montgomery got into a bases-loaded jam in the bottom of the first by sandwiching walks of Mauricio Dubon and Dominic Smith around an Ozzie Albies double before striking out Austin Riley to escape unscathed.

Chandler (2-7) entered in the second inning and threw 11 of his 19 pitches in a one-out battle with Jorge Mateo, getting him to pop up to first in foul territory. Sandy Leon ended an 0-for-28 hitless streak with a single to right, but Chandler got Ronald Acuna Jr. to fly out to right.

The Pirates (34-32) padded their lead in the third, when Jared Triolo and Henry Davis worked back-to-back walks and Horwitz reached on an infield single. After hitting a 103.1-mph shot for a homer, Horwitz connected on a changeup for a 43.7-mph roller inside the third-base line. Nick Gonzales grounded into a 6-4-3 double play that scored Triolo for a 2-0 lead, and Bryan Reynolds went down looking at a called third strike when the Braves won an ABS challenge to end the frame.

Chandler retired 13 consecutive batters — including a strikeout of Acuna on a game-best 100.5-mph fastball to end the fifth — as he threw strikes on 56 of his 88 pitches, including 13 first-pitch strikes.

“I thought it was the best he’s thrown the ball,” Pirates manager Don Kelly said. “Efficient. Threw strikes, until that last inning.”

Smith reached on a throwing error by third baseman Tyler Callihan to start the seventh. Chandler responded by getting Riley looking at a called third strike on a heater at the top of the strike zone before Mike Yastrzemski drew a four-pitch walk, prompting a mound visit. When Chandler walked Mateo on four pitches to load the bases, the Braves (45-21) brought in Harris to pinch-hit for Leon.

“As the game goes on, you get more tired. The rain doesn’t help. But there’s some pitches that I wish I had back. It’s like, why did I do that?” Chandler said. “That’s probably why it spiraled. Instead of thinking about this pitch, I was thinking about the last pitch or the last batter. When I was in the moment, I was thinking about the pitch I was going to throw and dialed in on it. When I started thinking about stuff I couldn’t control, it kind of just spiraled.”

The Pirates countered by turning to the left-handed Sisk. Harris lined an 0-1 sinker to right field for a bases-clearing double and 3-2 Braves lead. That was a bad omen for the Pirates, who were 2-25 when trailing after seven innings.

They loaded the bases in the eighth when Endy Rodriguez got a pinch-hit single to left and Horwitz and Reynolds drew walks. That brought Ryan O’Hearn to bat and Brandon Lowe — who left Saturday’s loss after fouling a ball off his right knee — in the on-deck circle. O’Hearn worked a full count against Tyler Kinley before grounding out to first base to strand the runners. The Pirates went 2 for 11 with runners in scoring position Sunday and 6 for 29 in three games.

“We’ve had some stretches where we’ve been pretty good and put up a lot of runs. In those games, we’re getting the big hit and we’re finding a way to drive runs in,” Kelly said. “It’s something that when you go through a series like this and that eludes you, especially against a team like Atlanta. We need to find a way to come up with the big hit and prevent them from getting the big hit.”

Lowe pinch-hit for Marcell Ozuna to lead off the ninth and smacked a Didier Fuentes first-pitch slider to right field for a double to put the game-tying run in scoring position. Oneil Cruz, who injured his hand sliding into home plate Saturday, pinch-ran for Lowe.

Jake Mangum fouled off four pitches before reaching on a bouncer to second base, then advanced on defensive indifference to put a pair of runners in scoring position. But Triolo popped up to second and Rodriguez went down swinging to end the game, as the 20-year-old Fuentes earned his first career save.

“A really tough loss, a tough series,” Kelly said. “Again, one hit away. Had the opportunities. They got the big hit with guys on and, unfortunately, we weren’t able to.”