ATLANTA -- The Atlanta Braves know the routine.

Get it down to their final swing. Come through with the big hit. Run onto the field to celebrate.

The Atlanta Braves did it again in their last at-bat, beating the Washington Nationals 3-2 on Jason Heyward's two-out, run-scoring single in the ninth inning Wednesday night.

"Whew!" manager Bobby Cox said. "We need a breather once in a while."

Atlanta won for the 21st time on its final swing, which leads the majors, and improved baseball's best home record to 44-16, maintaining their 2½-game lead on the Philadelphia Phillies in the NL East. The Phillies kept pace by beating the San Francisco Giants 8-2.

With one out, Rick Ankiel blooped a broken-bat single just over the outstretched glove of second baseman Adam Kennedy. Sean Burnett (0-7) was replaced by Tyler Clippard, who made matters worse by walking David Ross. Clippard struck out Omar Infante, but Heyward lined a 3-0 pitch to left-center to bring home Ankiel without a throw.

"It wasn't the best pitch to hit," said Heyward, who was mobbed by his teammates near second base, "but it was enough to get the job done."

Clippard's pitch was down and away. Not enough, though, to keep the Braves rookie star from delivering the fifth walk-off hit of his young career.

"I wasn't really throwing strikes," Clippard said.

Billy Wagner (7-2) struck out the side in the ninth.

The Braves' fourth straight win came hours after they acquired slugging first baseman Derrek Lee from the Chicago Cubs for three minor league pitchers. Lee will join the team when it gets to Wrigley Field on Friday for the start of a weekend series.

"We're excited about it," said Tim Hudson, who pitched seven strong innings but wasn't around for his 15th win. "It lets us know [the front office] is on the same page as us. We want to win. There's no egos in here."

In the meantime, the Braves did just fine in their next-to-last game before Lee comes aboard.

Hudson allowed two runs and eight hits -- all singles -- and benefited from four double plays. Washington starter Livan Hernandez allowed two runs over seven innings, pitching around nine hits and getting a heads-up play from center fielder Roger Bernadina in the sixth.

Martin Prado tried to tag up at first on a flyout to the warning track in the sixth. Bernadina wasn't fooled, making a strong throw to second that nipped Prado.

For the second straight night, the Nationals took a 2-0 lead. For the second night in a row, it didn't matter.

Michael Morse and Willie Harris got the third started with consecutive singles. With one out, Bernadina lined a run-scoring hit to right, but he was tagged out trying to reach second on the throw home. Ryan Zimmerman drove home another run with a two-out single to left.

In the fourth, the Braves loaded the bases with no outs on Prado's leadoff double and two walks. Hernandez was on the verge of escaping with minimal damage when Melky Cabrera hit into a double play -- Prado scored on the play -- but the Nationals' defense made a boneheaded play.

Alex Gonzalez lofted a popup into short right field. Morse came charging in from right field, Kennedy drifted out -- then both veered off at the last second, apparently thinking the other had called for the ball. It fell for a gift single that brought home the tying run.

The Nationals took another blow in the eighth when Zimmerman was tossed by home plate umpire Scott Barry after striking out to end the inning.

Zimmerman slammed down his bat and helmet, upset only at himself for swinging at a low pitch from Jonny Venters, but Barry took exception and gave him the heave. Walking toward his position, Zimmerman spun around in disbelief. Manager Jim Riggleman charged out of the dugout and got ejected, too, after an extended argument with the ump.

"I was frustrated about striking out," Zimmerman said. "He thought I was throwing my helmet at him."

Game notes

The Nationals placed catcher Wil Nieves on the temporary leave list so he could be with his wife, who's expecting a child. Catcher Wilson Ramos was recalled from Triple-A Syracuse to fill in while Nieves is away. ... Washington will make another roster move Thursday, when outfielder Nyjer Morgan is eligible for come off the 15-day DL. Outfielder Josh Willingham (knee) will replace Morgan on the DL. ... The Braves called up infielder Brandon Hicks from Triple-A Gwinnett for what figures to be a short stay. He'll likely return to the minors when Lee joins the Braves in Chicago on Friday. ... The Braves (71-49) haven't been 22 games over .500 since Sept. 27, 2005 (90-68).