Jonathon Niese pitched six-hit ball over eight innings, David Wright sparked the offense with a pair of doubles against Ben Sheets, and the New York Mets just hung on to beat the Atlanta Braves 6-5 Sunday night and salvage the finale of a three-game series.

A night after the Braves battered Johan Santana, Niese (9-6) tamed Atlanta's offense and stopped yet another slide by the Mets, who have faded from contention following the All-Star break. Niese matched the second-longest outing of his big league career, allowing one run, striking out six and walking two.

With the Mets ahead 6-1, the Braves loaded the bases with two outs in the ninth against rookie Josh Edgin.

Frank Francisco relieved and walked pinch-hitter Juan Francisco and Michael Bourn, forcing in a pair of runs, then gave up an opposite-field, two-run double to right to Martin Prado on an 0-2 pitch. Bourn was held at third as right fielder Mike Baxter made a clean pickup.

Jon Rauch then came in and retired Jason Heyward for his second save of the season. Catcher Rob Johnson didn't come up with Rauch's pitch in the dirt as Heyward swung at strike three, but his throw to first just beat Heyward for the final out.

Leading the Mets with a .325 average, Wright doubled to put New York ahead in the first. He also scored twice on singles by Ike Davis. Rookie Jordany Valdespin, starting in place of slumping Jason Bay, hit his eighth homer in 140 at-bats this season.

Atlanta lost for the fourth time in 18 games while the Mets won for only the ninth time in 30, and for just the second time in 13 home games. New York completed a 2-4 homestand and headed on a six-game trip to a pair of first-place teams in Cincinnati and Washington.

Sheets (4-2) had the poorest of his six outings this season, allowing five runs — four earned — and eight hits in six innings as his ERA rose from 1.41 to 2.13. He had pitched six scoreless innings in beating the Mets on July 15 in his return to the major leagues after a two-year absence.

Wright hit an opposite-field double to right in the first that drove in Baxter from first. Wright took third on right fielder Heyward's throwing error and scored on Davis' hit.

Freddy Freeman homered to right-center in the second, but Ruben Tejada's RBI single in the bottom half boosted the lead to 3-1. Wright doubled in the fifth and scored again on Davis' single, and Valdespin homered down the right-field line in the sixth. Valdespin started in left, even though Bay is a .400 hitter (12 for 30) against Sheets.

Andres Torres added an RBI single in the eighth against Cristhian Martinez.

NOTES: A night after Johan Santana allowed eight runs and got just four outs in his first start back from an ankle injury, Mets manager Terry Collins said the team isn't worried about his left shoulder and has no plans to end his season early. The two-time Cy Young Award winner missed 2011 following shoulder surgery. ... Torres in center field made a jumping catch at the front of the warning track on Brian McCann's drive that ended the fourth. ... Johnson started behind the plate instead of Josh Thole for the second time in the series. ... Braves RHP Tommy Hanson, on the DL with a strained lower back since July 31, allowed three hits in five scoreless innings and struck out five for Triple-A Gwinnett against Louisville. With Atlanta playing its third game in a stretch of 19 in a row without a day off, manager Fredi Gonzalez is thinking about possibly going to a six-man rotation for a short stretch. ... Completing his next-to-last series at Citi Field, Chipper Jones was 0 for 3 with a walk. He was booed every time he stepped up. ... Edgin hit Freeman on the back on the right shoulder with a pitch in the ninth.