It’s worth considering how different a position the Pittsburgh Pirates might be in shortly before the All-Star break if two of their key pitchers, Mitch Keller and Dennis Santana, weren’t navigating rough seasons.

Keller and Santana have been in an elongated funk, and based on their performances against the Atlanta Braves on Thursday at PNC Park, no end to their woes appears to be in sight.

In a 10-5 defeat, Keller was yanked after three inefficient innings, and Santana served up a ninth-inning grand slam that sealed things for the Braves (54-38).

“Yeah, just sucks,” said Keller (6-7, 5.14 ERA), who took the loss in front of 20,895 fans. “Obviously, don’t want to lose the series to an opponent that we felt like we could (have beaten).”

The Pirates were within 6-5 heading into the ninth thanks to a four-hit, three-RBI day by Jake Mangum — who finished a triple short of the cycle — and homers by Bryan Reynolds and Esmerlyn Valdez.

Manager Don Kelly then opted to insert Santana, who was Wednesday’s losing pitcher after allowing the game-winning homer in the eighth.

On Thursday, Santana quickly faced a bases-loaded jam, and on a 3-1 count to Mike Yastrzemski, gave up a grand slam over the Clemente Wall to put the game out of reach.

“It’s tough,” Kelly said of Santana. “There have been some home runs recently. That one was a big one today, and last night — I think his stuff has actually looked better. He’s gotten more strikeouts. He’s gotten beat by some pitches. His command is vital to him, and I think there have been some pitches that have caught too much of the plate recently and (teams) haven’t missed.”

Keller was pulled in favor of Cam Sanders at 72 pitches, having allowed three earned runs, four hits, two walks and three strikeouts.

A similarly ineffective appearance by Sanders dug the Pirates (47-47) into a deeper hole, and any hopes of a rally evaporated after Atlanta’s grand slam.

Matt Olson got the Braves on the board, hitting a solo home run in the top of the first to make it 1-0.

In the third, Michael Harris II singled and stole second base, coming around to score on a towering Ozzie Albies double that hit off the Clemente Wall.

Atlanta then took a 3-0 lead courtesy of a Mauricio Dubon RBI single.

Reynolds hit a solo shot off Atlanta starter Bryce Elder in the bottom of the third, and the Pirates’ next batter, Valdez, homered the other way, cutting the Braves’ lead to 3-2.

It marked the fourth time this season the Pirates hit back-to-back home runs, as Reynolds collected his 14th of the year and Valdez hit homer No. 7.

The Pirates’ one-run deficit did not last long. In the fourth, Sanders let up a two-run homer to Jim Jarvis after Yastrzemski walked.

Jarvis’ first career home run put the Braves up 5-2.

Sanders got into more trouble after walking Albies and Olson, as Drake Baldwin’s RBI single made it 6-2.

“Just lack of strikes, falling behind and walking guys,” Kelly said of Sanders’ outing. “Then when he fell behind, it’s tougher to get outs.”

Kelly next turned to Hunter Stratton, who retired Dubon on three pitches to end the threat.

Despite Sanders’ shaky relief appearance, the Pirates offense soon responded, as Mangum lifted a two-run homer to trim the deficit to 6-4.

Mangum’s second home run of the year plated Jared Triolo, who reached base on catcher’s interference.

After a rain delay of 38 minutes, Mangum made it 6-5 in the bottom of the sixth, ripping an RBI double down the right-field line to score Nick Gonzales, who walked.

With two men on, Brandon Lowe then fouled out to end the inning.

The Pirates stranded Gonzales on third in the eighth, and in the bottom of the ninth, had no response to Atlanta’s grand slam.

In total, the Pirates went 1 for 11 with runners in scoring position and stranded eight men.

“Five runs — we need to find a way to win when we scored,” Kelly said.