NEW YORK — The New York Yankees built a six-run lead in the first four innings Tuesday night, then held on to beat the Atlanta Braves 8-5.

The Braves whittled away at the lead and pulled to within a run when Nick Markakis hit a two-run homer in the seventh inning.

The Braves threatened in the eighth, putting runners on first and second with one out. But Chasen Shreve relieved Adam Warren and struck out Ender Inciarte and got Ozzie Albies to ground out to end the inning.

Giancarlo Stanton provided the Yankees with some insurance, stroking a two-run homer to the first row in right field in the bottom of the eighth.

Aroldis Chapman retired the Braves in order in the ninth for his 24th save.

Aaron Hicks and Kyle Higashioka also hit homers for the Yankees.

BLUE JAYS 8, METS 6: Lourdes Gurriel Jr. hit a tie-breaking two-run home run in the eighth inning and Toronto rallied from a five-run deficit to beat visiting New York.

Yangervis Solarte hit a tying three-run home run off Robert Gsellman in the seventh before Gurriel Jr. went deep off Tim Peterson (1-1) in the eighth as the Blue Jays won for the 11th time in 14 home games.

The struggling Mets have lost 11 of 13.

John Axford (2-1) pitched 12/3 innings to earn the win. Tyler Clippard got the final out for his sixth save in 10 opportunities, stranding runners at first and second.

Mets right-hander Zack Wheeler allowed two runs and three hits in 61/3 innings but was denied his first victory since April 29 at San Diego.

Asdrubal Cabrera and Devin Morasco each hit two-run home runs and Wilmer Flores added a solo shot for the Mets.

Cabrera connected against Blue Jays right-hander Marco Estrada in the first and Morasco homered off Jake Petricka in the second.

Estrada was removed after 12 pitches because of a sore left hip. He faced three batters and got one out. Estrada allowed two runs and one hit.

Petricka replaced Estrada and pitched 22/3 innings.

Mets outfielder Jose Bautista went 1 for 2 with a single and three walks in his first game in Toronto since leaving the Blue Jays at the end of last season, ending a 10-year run north of the border.

The crowd of 24,010 gave Bautista a standing ovation before his first at-bat. The two-time home run champion took off his batting helmet and acknowledged both the fans and the Blue Jays dugout before drawing a five-pitch walk and scoring on Cabrera’s 15th homer.

Bautista made a diving catch to retire Russell Martin for the final out of the second.

BREWERS 2, TWINS 0: Eric Thames hit a two-run homer and three pitchers combined on a two-hit shutout as Milwaukee won at home.

The Twins fell to 1-7 on their current nine-game trip.

Milwaukee broke through in the fifth against Minnesota’s Jake Odorizzi (3-6) when pinch-hitter Nate Orf walked and stole second before Thames hit his 12th home run of the season, a liner that barely cleared the right-field fence.

CUBS 5, TIGERS 3: Anthony Rizzo drove in his second run of the game in the seventh inning to snap a tie, Kyle Schwarber followed with a solo homer in the eighth and Chicago rebounded from an early three-run deficit to edge visiting Detroit.

With one out in the seventh, Jason Heyward and Ben Zobrist singled off Tigers reliever Daniel Stumpf (1-4). Rizzo’s slow bouncer up the middle resulted in a force of Zobrist at second, but Jose Iglesias’ throw to first was too late to double up Rizzo and Heyward scored from third to put Chicago ahead for the first time, 4-3.

Schwarber hit his team-leading 17th homer to right.

NATIONAL LEAGUE

ROCKIES 8, GIANTS 1: Antonio Senzatela pitched seven scoreless innings in his first start of the season, Nolan Arenado hit his National League-leading 22nd home run and Colorado beat visiting San Francisco.

Colorado’s Charlie Blackmon had three hits, including his first homer since June 20. Trevor Story had an RBI triple for the Rockies, who have won five of their last six games.