On Craig Kimbrel’s first official day with the Cubs, former Braves were responsible for their old club’s undoing.

Braves pitching failed to hold a five-run advantage, and the Braves lost a 9-7 shootout with the Cubs on Thursday afternoon. As fate would have it, Kimbrel finished it for his first save with the Cubs, despite allowing a double and a walk in the ninth.

The Braves split the four-game set at Wrigley Field and finished 5-2 against the Cubs in the regular season. Still, they were on the verge of winning three of four in one of baseball’s toughest environments.

“It could’ve been more, that’s the frustrating thing,” first baseman Freddie Freeman said. “That’s a good team over there. When you get up five runs, you start to think ‘All right, we’ve got this.’ That lineup is too good. They’re going to come back. We gave away some outs today. We didn’t play a complete, full, clean baseball game and they took advantage of it.”

Kimbrel took the mound in the ninth to a thunderous applause and standing ovation. The likely Hall of Famer and beloved ex-Brave signed with the Cubs earlier in June. He was called up Thursday morning.

Fittingly, Kimbrel faced old battery mate Brian McCann to lead off the ninth. McCann struck out looking on a questionable strike call. Kimbrel, whose fastball was hitting 98 mph, then retired Johan Camargo on a grounder.

Ronald Acuna’s ground-rule double gave the Braves a chance. Dansby Swanson drew a four-pitch walk, setting up the only appropriate conclusion: Freeman versus Kimbrel.

Freeman rocketed the first pitch he saw, but it was directly to first baseman Anthony Rizzo, who tagged first to end the contest.

“You knew it was going to happen today,” Freeman said of Kimbrel’s debut. “I really wanted to come through there. I hit it good, just straight into the ground. I’m not as fast as I thought I was, wasn’t able to beat it out.

“But I think Craig is going to be really good for them. I think it’s good for the game that Dallas (Keuchel) and Craig are on teams. Unfortunately, I text him yesterday not to have success against us. He responded, but he had success against us today.”

Bryse Wilson’s second start of the season didn’t go as he hoped. He went 4-1/3 innings, allowing six runs (four earned) on six hits. Wilson’s slider wasn’t as sharp as it’s been in the past, despite notching six strikeouts. In the end, he was unable to guard a 6-1 lead.

Wilson exited after Rizzo’s RBI-double pulled the Cubs within a run. Former Braves fan favorite Jason Heyward tripled off Josh Tomlin, evening the score with his third RBI. Former Braves prospect Victor Caratini followed with a go-ahead two-run home run two pitches later.

The Braves haven’t decided how they’ll approach their fifth starter spot in the future. Wilson, 21, was making his third big-league start because Mike Foltnewicz was demoted to Triple-A last weekend, vacating a place in the rotation.

“It gave me a lot more confidence in my fastball,” Wilson said, taking positives from his outing. “Change-up was good. Slider wasn’t what it has been down in Triple-A, but I’ll keep going with that. It still wasn’t a bad pitch today.”

Catcher Tyler Flowers agreed that Wilson was better than his box score indicated. He praised Wilson’s conviction in his pitches.

“I thought he threw the ball great to be honest with you,” Flowers said. “I thought he threw the ball outstanding. I know the numbers probably don’t look that way at all, but it felt like he could’ve been six or seven innings, one run there. It just seemed like a number of things rolled against us there that really snowballed the numbers for him.”

Up five runs in the fourth, the Braves trailed by two at fifth inning’s end. Ozzie Albies responded with a homer before the Cubs got their run back on a wild pitch in the bottom of the sixth.

The Braves’ offense had little problem with Tyler Chatwood. Swanson had three RBIs. Freeman hit a two-run homer. They built a lead that their pitching had proved capable of protecting lately.

“They’re a good team. We knew that coming in,” manager Brian Snitker said. “You better make pitches and you better locate because they’re dangerous. They’re a strong team. We couldn’t stop the bleeding in the (fifth) inning.”

Braves relievers had a 3.74 collective ERA entering the game, fifth-best mark in MLB. Since Anthony Swarzak joined the team May 22, their 2.60 ERA was baseball’s best. The reality was they weren’t going to protect every lead.

Just as it felt inevitable that Kimbrel would face the Braves in his debut, Freeman, discussing his final at-bat, hinted that perhaps the parties will see each other again.

“I really wanted to come through because I’ve talked to him a lot in the past couple months,” he said. “I was really hoping to come through against him there. Maybe in the playoffs.”

The Braves finish their 10-game trip with three in New York this weekend. The Mets were just swept by the Phillies and trail the Braves by 11 games in the National League East. Game 1 will feature dueling aces Mike Soroka and Jacob deGrom.