ATLANTA (AP) — The St. Louis Cardinals' bats fell flat in Atlanta during a three-game series between NL division leaders. That leaves little margin for error in their upcoming four-game showdown for the Central lead. The Cardinals were swept in three games at Atlanta for the first time in 10 years Sunday night as Jason Heyward homered and drove in two runs to help the Braves beat St. Louis 5-2. St. Louis still boasts baseball's best record but leads Pittsburgh by only 1½ games in the NL Central. The Cardinals open a four-game series at the Pirates on Monday night. "You never want to go into a place and get swept," said Cardinals rookie Shelby Miller, who gave up three runs, two earned, in 5 2-3 innings. "We were battling the whole time. I don't think we had a terrible series, we just didn't come out on top in any of the games. ... We just couldn't finish it off. But we have to put this series behind us and go on to the next one and see if we can't win some games in Pittsburgh." The Cardinals, who lead the NL in batting average and scoring, were held to three runs in the series against the NL East-leading Braves. "Their guys threw well," manager Mike Matheny said. "I think we probably weren't as locked in as we've been a good portion of this season either, so that makes for a tough combination." The Braves broke a 2-all tie with two runs in the sixth inning off Miller (10-7) and two relievers. Pinch-hitter Joey Terdoslavich drove in Chris Johnson with the go-ahead run. Heyward added another run-scoring single. The Cardinals were swept in a road series for the first time this season. Heyward hit leadoff for the second straight night and only the third time this season. He has nine homers, including two in the series. "I'm getting more comfortable in general," Heyward said. "The more you move, it is hard to get comfortable." Braves manager Fredi Gonzalez said the "common denominator" in the three-game sweep was dominant starting pitching. Following strong starts by Mike Minor and Julio Teheran, Kris Medlen (7-10) allowed two runs on eight hits and a walk in six innings to snap his three-game losing streak. The three wins came after Tim Hudson, the leader of the staff, sustained a season-ending broken right ankle Wednesday night in New York. "Nobody needs to be Huddy," Gonzalez said. "Nobody needs to be the ace or that kind of label. Believe me, I'm going to fight that the next two months when we're pitching well. Collectively, I think, as a unit you circle the wagons, you go out there and you get those three performances that we had." The Braves finished their first three-game sweep of the Cardinals at Turner Field since April 2003. Atlanta relievers Luis Avilan, Jordan Walden and Craig Kimbrel combined for three scoreless innings. Kimbrel pitched a perfect ninth to take the NL lead with his 31st save. Johnson singled with two outs in the second, moved to third when the ball bounced past Carlos Beltran in right field for an error, and scored on a single by Andrelton Simmons. Heyward's line-drive homer to the front row in right field pushed the lead to 2-0 in the third. The Cardinals pulled even with two runs in the fifth. Back-to-back doubles by Pete Kozma and Miller produced the first run. With two outs, Beltran hit a fly-ball single to left field that fell between Evan Gattis and Simmons, who sprinted into the outfield from his shortstop position. Gattis, a natural catcher, was playing deep for the power-hitting Beltran and was slow to break on the ball. The Braves' two-run sixth began with two outs. Johnson, who entered the night tied with Cardinals catcher Yadier Molina for the NL lead with a .332 batting average, singled for his second hit and moved to third on Simmons' second single. Terdoslavich and Heyward followed with run-scoring hits. Johnson added his third hit, a double, off Fernando Salas in the eighth to push his average to .338. Reed Johnson reached on an infield single, and Chris Johnson scored on a throwing error by Kozma from shortstop. Reed Johnson pulled up with an apparent injury after running to first and was replaced by pinch-runner Jose Constanza. The Braves made two strong defensive plays. Simmons went to his right, falling to his knees, to snag a grounder by David Freese before throwing to second to start a double play in the second. Freddie Freeman leaned over the railing in front of the Atlanta dugout to catch a foul popup by Matt Holliday to end the eighth. NOTES: Cardinals GM John Mozeliak said the team is "not close to doing anything" before Wednesday's trade deadline. Mozeliak said he is reluctant to trade prospects "for short-term gain." ... Molina had two hits, leaving his average at .334. ... The Braves' last three-game sweep of the Cardinals was May 11-13, 2012, in St. Louis. ... Jake Westbrook pitches the series opener in Pittsburgh against Francisco Liriano.