PITTSBURGH — Mike Yastrzemski delivered a game-sealing grand slam in the top of the ninth inning, Matt Olson connected for a first-inning home run while tying the franchise record for consecutive games played, and the Atlanta Braves defeated the Pittsburgh Pirates 10-5 on Thursday afternoon to take the rubber match of a three-game series at PNC Park.

The Braves were leading 6-5 when Yastrzemski connected off Dennis Santana for the third grand slam of his MLB career, which dates to 2019.

Olson’s home run, which was a solo shot and his 25th homer overall this season, opened the scoring. The first baseman played in his 740th straight game, dating to the start of the 2022 season, and tied the mark set by Dale Murphy from 1982-86.

Atlanta’s Jim Jarvis hit the first home run of his MLB career, connecting for a two-run blast off Cam Sanders in a three-run fourth inning that extended the lead to 6-2. The rookie shortstop totaled three hits in the game, which followed up a 3-0 win on Wednesday night that ended a three-game losing streak for the Braves.

Pittsburgh’s Bryan Reynolds and Esmerlyn Valdez hit back-to-back homers in the third inning Thursday to cut the Braves’ lead to 3-2. Jake Mangum had four hits and three RBIs, including a two-run homer in the fourth that brought the Pirates within 6-4 and an RBI double in the sixth that made it a one-run game.

Atlanta starting pitcher Bryce Elder allowed four runs in four innings, while Pittsburgh counterpart Mitch Keller (6-7) gave up three runs in three innings to fall to 1-5 with a 7.94 ERA in nine career starts against the Braves.

Atlanta reliever Dylan Dodd (2-0) pitched a perfect fifth for the win on the mound. The game was delayed by rain for 35 minutes at the end of that inning.

The Braves improved to 54-38, maintaining their three-game lead over the second-place Philadelphia Phillies in the National League East Division.

The Pirates, who won Tuesday’s series opener 12-4, fell back to .500 at 47-47 overall this season and sit fourth in the NL Central, 12 1/2 games out of first place. They lost all but one game in their season series with the Braves, who swept Pittsburgh on June 5-7 at Atlanta’s Truist Park.

Before the game, the Braves activated outfielder Eli White from the paternity list and designated outfielder Jose Azocar for assignment. White, who joined the team in Pittsburgh but did not play, is hitting .218 this season with four home runs, 15 RBIs and four stolen bases in 53 games.

Azocar played 11 games for Atlanta and went 6-for-17 (.353).

The Braves remain on the road for a three-game series against the St. Louis Cardinals that starts Friday at Busch Stadium and will take them into the midseason break for the MLB All-Star Game, which is Tuesday at Philadelphia’s Citizens Bank Park. The scheduled starting pitchers for the series opener are Atlanta left-hander Chris Sale (9-6, 2.27 ERA) and St. Louis right-hander Kyle Leahy (7-4, 3.86).