ATLANTA — The Atlanta Braves never have much margin for error.

Leaving the bases loaded in the fourth inning ruined their best chance to keep the game close in a 10-3 loss to the New York Mets on Sunday.

“That was tough, and we had two four-run innings against us,” interim manager Brian Snitker said. “That didn’t help either.”

Atlanta dropped to 23-46 at home, worst in the major leagues.

Yoenis Cespedes hit a grand slam and Seth Lugo won his fourth straight start for New York.

The Mets have won seven of eight and are 16-5 since Aug. 20. St. Louis’ 2-1 loss to Milwaukee moved New York one-half game ahead of the Cardinals for the second NL wild-card spot.

Lugo (4-2) allowed six hits, two runs and one walk and struck out five in seven innings. He is 3-1 with a 1.99 ERA in five career starts after joining the rotation on Aug. 19.

The Braves cut the lead to 6-1 in the fourth on Freddie Freeman’s RBI single, but Lugo stranded the bases loaded when Anthony Recker popped up and Dansby Swanson grounded into a double play.

“He didn’t have a ton of trouble out there,” Recker said. “That one inning we really had a chance, and we let that one slip away.”

Cespedes drove in the game’s first five runs off Williams Perez (2-3), who gave up four hits, five runs and one walk and struck out two in 2 2/3 innings. Perez left the game with right triceps impingement.

Cespedes’ 30th homer, which cleared the bases in the third, was his second grand slam this season. He has four in his career.

“If he’s going to get hot, this is a good time,” manager Terry Collins said. “This is a big stretch for us.”

James Loney homered to make it 6-0 in the fourth. Kelly Johnson and Alejandro De Aza had RBI singles, Loney an RBI double and Lugo a sacrifice fly for a 10-1 lead in the fifth.

New York led 1-0 in the first when Asdrubal Cabrera tripled and scored on Cespedes’ groundout.

Cespedes is hitting .308 with eight homers and 19 RBIs since Aug. 19.

Brandon Snyder cut the lead to 10-2 in the seventh with his third career pinch-hit homer.

With the Braves moving to a new ballpark next year, the Mets went 67-106 in 20 years at Turner Field. New York won 11 of its last 14 at the former stadium of the 1996 Olympics.

REMEMBRANCE DAY

Players and coaches stood along the baselines before the game as the Braves held a 13-minute ceremony to mark the 15th anniversary of the terrorist attacks in New York, Washington and Pennsylvania.

A massive flag was held across the outfield while the team played a video commemorating the attacks and the Braves-Mets game on Sept. 21, 2001, at Shea Stadium — the first major sporting event held in New York after 9/11.

Sunday’s ceremony included a 21-gun salute, a color guard from the U.S. Customs and Border Protection, flag bearers from the U.S. Army, an honor guard from the Smyrna, Georgia, police and a contingent of bagpipes and drums.

STILL STREAKING

Freeman has reached safely in a career-high 33 straight games. He has hit safely in 28 of his last 29 games since Aug. 1 and is hitting .362 over that span.

TRAINER’S ROOM

Mets: Manager Terry Collins said INF Wilmer Flores was available to pinch-hit after suffering a neck contusion on a collision at the plate Saturday. … Collins said LHP Steven Matz (shoulder tightness) “was fine” after throwing 20 pitches off a mound Saturday in Port St. Lucie, Florida. Matz will throw again on Monday. … RHP Jacob deGrom (forearm soreness) will throw off a mound either Monday or Tuesday.

Braves: C A.J. Pierzynski was placed on the 15-day disabled list with a strained left hamstring. Pierzynski, 39, wouldn’t say after Saturday night’s 10-inning victory if he’s played his last game. He was not at the ballpark Sunday, but his jersey still hung in his locker and his name plate was in place. None of Pierzynski’s belongings had been removed.

UP NEXT

Mets: RHP Rafael Montero (0-0) will make his third start. He is 0-1 with a 6.43 ERA in one career start and one relief appearance against Washington.

Braves: RHP Mike Foltynewicz (8-5) will make his 21st start. He is 1-0 with a 4.15 ERA in two career starts against Miami.