Just when it looked as if one mistake pitch might be too much for Kris Medlen and the Braves to overcome Tuesday night, Evan Gattis and Andrelton Simmons stepped up and demonstrated again the resuscitative powers of the home run.

After Gattis hit a tying solo homer in the seventh inning, Simmons hit a no-doubt-about-it, two-run shot two batters later to lift the Braves to a 3-1 win against the New York Mets at Turner Field and reduce their magic number to 10 to clinch the National League East title.

“He left one right down Main Street, and I got all of it,” Simmons said of his 13th home run and first since July 25. “I think that’s the furthest one I’ve ever hit. Especially to left-center.”

The win was the eighth in nine games for the Braves, and their 20th in 24 home games. Any combination of Braves wins and Washington Nationals losses totaling 10 will give the Braves their first division title since 2005.

Medlen (12-12) continued his recent impressive run, allowing seven hits and one run in seven innings, with no walks and nine strikeouts, and Craig Kimbrel had two strikeouts in the ninth inning for his majors-leading 44th save and 34th in a row without a blown save.

“The way our offense has been going, you just find a way to hang in there and they always find a way to have big innings,” Medlen said. “No different today. Simba and Gat did a huge thing for myself and for the team.”

Gattis had three hits, and long-slumping B.J. Upton had his second consecutive two-hit game for the Braves, making him 11-for-25 on the homestand and lifting his average to .200 for the first time all season.

The home run by Gattis ended a drought of 70 at-bats since his last one July 24 and capped a resounding return for the big rookie, in his first game back after being sent to Triple-A Gwinnett for what amounted to a three-game tuneup.

“I felt fixed before leaving,” said Gattis, who had six hits including three doubles and homer at Gwinnett. “It’s good to go there and really kind of put it in action. And from there, yeah, definitely good to have a good night here – first one (back) especially.”

Gattis hit only .169 with two extra-base hits (doubles) in his past 20 games and had barely gotten off the bench in the past week. He was baseball’s most dangerous pinch-hitter in the early season, and the Braves wanted to get his bat going again as they entered the final month of the regular season.

“He went down there and he took it the right way,” Braves manager Fredi Gonzalez said. “He went down there and worked on his swing, got 13 at-bats that he might not have been able to get in that time span here and it worked… Every once in a while just go down there and get stuff right, and he did. And he came back out today and you saw what he did. That’s a big bat.”

Gattis’ one-out homer off Carlos Torres (3-3) in the seventh inning was his 16th and only the fifth hit of the night (and first extra-base hit) against the Mets starter. Dan Uggla followed with a walk before Simmons crushed a 1-0 pitch over the center-field fence.

“It felt good,” said Simmons, whose 13 home runs are fourth-most among NL shortstops. “Gattis tied it up, so after that Danny walked and got (Torres) a little tired. He was trying to find the zone; I guess he was making sure he didn’t walk me, too.”

Torres left a 1-0 pitch over the plate and Simmons crushed it. Just like that, the Braves turned a 1-0 deficit to a two-run lead.

“It’s nice to have (Gattis) back,” Simmons said. “We saw in (batting practice), just flicking balls over the fence. And we knew right away he was locked in from the start, lining a ball to right-center.”

The run support helped Medlen improve to 6-2 with a 2.75 ERA in his past eight starts, with 43 strikeouts and six walks in 49 innings. He lasted at least six innings in six of those starts and issued no more than one walk in any of them.

The right-hander lowered his overall ERA to 3.48, including 2.66 in 15 home starts. Medlen has won all seven of his home starts in which the Braves scored more than two runs while he was in.

“I thought he was outstanding,” Gonzalez said. “I thought there for a second he was going to be one of those hard-luck losses because Torres was that good across the way. In the bottom of the seventh inning he makes a couple mistakes and we run it out of the ballpark and were able to get out of that inning in the eighth and Kimbrel in the ninth. I thought Kris was outstanding.”

Medlen retired 11 consecutive batters before Lucas Duda’s two-out double in the fourth inning and had faced only two batters over the minimum through five innings before Eric Young led off with trouble in the sixth.

Young hit a long drive over the head of Gattis, who rumbled back to the warning track and extended his glove in full stride, only to have the ball sail inches past it for a triple.

While that fly ball perhaps was catchable, the one by the next batter was not: Medlen left an 0-2 fastball over the plate to Daniel Murphy, who lined it to the right-field corner to give the Mets a 1-0 lead.

“It went down to one pitch to Murphy, just a poorly executed 0-2 pitch,” Medlen said. “I thought we had him leaning over, but he’s a good hitter; I think he’s one of the best hitters. He hit the double to the corner, 1-nothing. Just try to keep it there.”

He did, and it didn’t take much longer for the Braves to pull out the power bats and turn the game around.

In the second inning, Gattis snapped an 0-for-17 stretch with a one-out single to right-center on the first pitch he saw.

With Gattis at first, Uggla struck out and Simmons flied out to end the inning. Uggla, who also grounded out to end the fourth inning after a two-out Gattis single, is 8-for-80 with no homers and 29 strikeouts in his past 24 games, including 3-for-20 with no RBIs in seven games since returning from a stint on the 15-day disabled list for laser eye surgery.

Uggla does have seven walks since returning from the DL, including a key one Tuesday to set up Simmons’ winning homer.

While Medlen was in a groove most of the night, so was Torres. The Mets right-hander gave up one single in each of the first four innings, twice with only one out, and the Braves had advanced only one of those runners to second. Then he turned it up a notch, retiring the Braves in order in the fifth and sixth innings, including consecutive strikeouts of Justin Upton and Freddie Freeman to start the sixth.

But Torres spent most of the season in the bullpen and had pitched more than 2-1/3 innings only once in more than two months. In the seventh inning, the Braves teed off on a couple of pitches he left over the plate.