ATLANTA -- When it comes to grand slams, Ryan Howard has a good sense of timing.
Howard, who came up from the minors to replace the injured Jim Thome, hit his first grand slam against the Los Angeles Dodgers on Aug. 10 -- a ninth-inning shot that broke a 5-all tie.
This one was even bigger, keeping the Phillies from a devastating loss after they blew two three-run leads.
"Every game is tight. Every game is a must-win," Howard said. "You've got to go out there and handle your business. Hopefully, you're there at the end."
Jimmy Rollins drove in two runs and extended his hitting streak to 26 games as the Phillies pulled within five games of the Braves in the NL East.
Both teams have 10 games remaining, leaving Atlanta's magic number for clinching a 14th straight division title at six.
The Phillies' best hope for reaching the playoffs is the wild card. They remained two games behind Houston, which won 12-8 at Pittsburgh after jumping to an 8-0 lead in the second inning.
"I stopped watching that one on the scoreboard," manager Charlie Manuel said. "I figured it was over."
Adam LaRoche hit a three-run homer and had four RBI for the Braves. Johnny Estrada added a two-run homer.
It wasn't enough.
Philadelphia loaded the bases with no outs in the 10th off Kyle Davies (7-4). Shane Victorino hit into a forceout at the plate, and the Braves brought in left-hander John Foster to face Howard.
The move made sense -- Howard was hitting .120 (6-of-50) with one RBI off lefties. Manuel called his hitter back to the dugout, but had no intention of sending up someone else.
"I told him to relax and make sure he stayed on the ball," the manager said.
Foster, who had not pitched in eight days because of a sore elbow, fell behind 2-0, then gave up Howard's 19th homer -- an opposite-field shot into the left-field stands.
"I figured I got it pretty good," he said. "With a 2-0 count, I was looking for a fastball."
Foster said his elbow wasn't the issue.
"I just made a bad pitch," he said. "It was supposed to be away. It was down the middle."
Geoff Geary (2-1) pitched the ninth inning and got the win.
Rollins kept his hitting streak going with a fourth-inning single, tying the Phillies' post-1900 record. Chuck Klein had two 26-game streaks in 1930.
Two Philadelphia players had longer streaks before 1900: Billy Hamilton's 36-game run in 1894 and Ed Delahanty's 31-game streak in 1899.
The Phillies scored three runs in the second off Horacio Ramirez, who started in place of John Smoltz. Atlanta's top winner skipped his spot in the rotation to rest an ailing shoulder.
Ramirez, who has endured an up-and-down season, gave up a two-run homer to David Bell and an unearned run scored when Jeff Francoeur overran a single to right field for an error.
The Braves tied it at 3 off Brett Myers. Estrada homered off his former team in the fourth, and LaRoche tied it up with a bases-loaded walk in the fifth.
Philadelphia built another three-run lead. Rollins' two-run single with two outs in the sixth made it 5-3, and Chase Utley's added an RBI single the next inning.
Again, the Braves rallied. With two outs and two runners on, Ryan Madson threw a chest-high fastball that LaRoche hit 393 feet into the right-field stands. Bobby Abreu barely moved as the ball soared over his head for LaRoche's 18th homer.
"It was a tight (strike) zone tonight, so you could look for your pitch," LaRoche said. "Good for hitters, bad for pitchers."
While the Braves still have a comfortable lead in the division, they want to finish strong. Atlanta is 25-22 since the beginning of August.
"We'll probably get away with it," LaRoche said, "but that's not the kind of ball you want to be playing."
Myers lasted five innings, giving up three runs, four hits and four walks.
Ramirez didn't help his chances of making Atlanta's possible postseason rotation. He went six innings, allowing seven hits, walking four and getting charged with five runs (four earned).
SS Rafael Furcal set an Atlanta record with the 187th stolen base of his career, breaking the mark he shared with Otis Nixon for one day. Furcal has 44 steals this season. ... The franchise record for career steals belongs to Hank Aaron, who picked up most of his 240 while the Braves were in Milwaukee. Furcal is third on the franchise list, also trailing Rabbit Maranville (194). ... The Phillies improved to 6-4 in extra-inning games, while the Braves dropped to 6-6.