Jason Heyward hit a three-run homer to cap a six-run inning spurred by David Wright's error and the Atlanta Braves shook off the road blues by starting a critical nine-game trip with a 6-4 victory over the New York Mets on Friday night.

Tommy Hanson (10-11) won for just the second time in 14 starts and Omar Infante had a two-run double for the Braves, who came into the series in New York having dropped three of four at home and falling three games behind the Phillies in the NL East. Atlanta entered Friday's games with a half-game lead over San Diego in the wild-card race.

Billy Wagner, working against his former team, threw a perfect ninth for his 34th save.

Injured six-time All-Star Chipper Jones gave his team a pep talk before the game, knowing this trip, with stops in Philadelphia and Washington, could make or break the Braves' playoff chances. Problem is: the Braves are 31-41 away from Turner Field.

To form, Atlanta came out flat, managing just one hit in the first three innings against Jonathon Niese.

But thanks to a one-out throwing error in the fourth by Wright at third base, and a two-out walk to Hanson, the Braves rallied. Melky Cabrera had a run-scoring single before Hanson walked to load the bases. Niese (9-9) then gave up a two-run double to Infante before Heyward drilled a shot off the facing of the second deck in right field for a 6-3 lead. All the runs against Niese were unearned.

Bobby Cox's opener to his final regular-season series in New York ended quickly. The Braves' manager was ejected two batter's into the second inning when he took exception with umpire Bill Hohn's strike zone after a walk to Ike Davis.

After the brief delay during which Cox argued with Hohn and then first base umpire Gary Darling, the Mets turned the walk into three runs against Hanson, a pitcher they have previously struggled mightily against.

Josh Thole followed the walk to Davis with a single. Lucas Duda had an RBI single and, an out later, Niese and Jose Reyes had consecutive run-scoring singles for a 3-0 lead.

Hanson was 2-1 with a 0.73 ERA in four starts against the Mets coming in. And after that rough second inning, he settled to finish six innings, allowing only Duda's first major league career homer.

Hanson's only win over that 13-game stretch was over the Mets on Sept. 1.

Braves Reliever Takashi Saito left after striking out two batters in the eighth with right shoulder discomfort. Cox said the setup man is day to day.

NOTES: Niese gave up five hits and six unearned runs in four innings. He walked three and struck out four. ... The Mets will honor Cox with a ceremony before Sunday's game. ... Braves CF Cabrera was called out on strikes in the sixth inning when he swung at strike three but was hit by the pitch. The ball got away from the catcher and reliever Sean Green threw out Cabrera, but by rule it's a straight strikeout. ... Mets OF Angel Pagan was a late arrival because of a family problem and was scratched from the lineup. He struck out for the final out of the game.