NEW YORK -- Just when the New York Yankees fought back to overcome a slew of early home runs they allowed, Atlanta Braves right fielder Jason Heyward hit them with another.

For the second game in a row, Heyward was the Braves' key figure in a win over the Yankees, this time hitting two of Atlanta's five homers in a 10-5 win Wednesday afternoon at Yankee Stadium.

The second homer came in the top of the eighth, a two-run shot from Heyward off left-hander reliever Boone Logan capping a three-run inning. Along with a leadoff double by Martin Prado and a RBI groundout by Freddie Freeman, it gave the Braves a 9-5 lead. The cushion opened up breathing room after the Yankees hit four of their own home runs to trim a 6-1 deficit to 6-5.

Freeman, Prado and David Ross also homered for the Braves, who won their second straight game after dropping seven of eight. Prado had three hits, two runs, and two RBI. Freeman and Heyward, who made meaningful offensive and defensive contributions Tuesday, each had three RBI on Wednesday.

The Yankees' second loss in a row was just their fourth in 18 June games.

Robinson Cano, Alex Rodriguez, Derek Jeter and Eric Chavez homered for New York.

Along with the nine home runs, the game featured 11 pitchers, with the Yankees using five relievers and Atlanta four.

Tommy Hanson (8-4) allowed four runs on five hits -- including all four solo homers -- in five innings for Atlanta. Phil Hughes (7-6) allowed a career-worst four home runs to the Braves, who scored on him six times in 4 1/3 innings.

The Yankees nearly erased their early five-run deficit. Curtis Granderson's one-out RBI single in the seventh off reliever Chad Durbin pulled the Yankees within a run, 6-5. The hit also sent Jeter to third, but Durbin came back to get Rodriguez on a double play to end the inning.

After Hughes allowed his four homers in the first five innings, the Yankees answered with three of their own in the fifth and sixth. But the Braves held onto the 6-4 lead and made several strong defensive plays to cut down rallies as they did during Tuesday's win.

Chavez started the fifth with a homer to right off Hanson. But after a walk to Russell Martin, center fielder Michael Bourn robbed Jayson Nix of an extra-base hit with a leaping catch in right-center just in front of the wall.

In the sixth, Rodriguez and Cano hit back-to-back shots to chase Hanson, who left with a 6-4 lead. But, after Jonny Venters came on to walk Nick Swisher, Raul Ibanez bounced a grounder to first. Freeman stepped on the bag for the first out before getting Swisher in a rundown that resulted in a 3-6-3-4-6 double play.

The Braves peppered Hughes for solo homers in three straight innings for a 6-1 lead. Prado hit a solo shot to left in the third, Heyward smacked a drive to right-center in the fourth and Ross homered to center in the fifth.

The Yankees trimmed a 3-0 Braves' lead to 3-1 in the bottom of the first when Jeter started the Yankees off with a home run for the 28th time in his career, extending his team record.

Hughes had allowed two runs or less in six of his past seven starts, but Atlanta pounced on him in the first. They went up 3-0, thanks to a run-scoring single by Dan Uggla and Freeman's two-run shot to center that followed.