PHILADELPHIA -- With one mighty swing, Pedro Feliz lifted the Phillies out of their recent funk.

And he also lifted them one step closer to their third consecutive National League East title.

Feliz ripped a slider for a grand slam off Wilton Lopez in a four-run fourth inning, leading the Phillies to a much-needed, 7-4 victory over the Astros on Tuesday night before a sellout crowd of 45,082 at Citizens Bank Park. Jayson Werth added a two-run shot off Wesley Wright with two outs in the fifth for his career-best 35th homer.

Feliz received a curtain call from the appreciative Phillies fans.

The Phillies snapped a five-game losing streak to Houston and trimmed their magic number to clinch the NL East to one, as the second-place Braves fell to the Marlins, 5-4, in Atlanta.

"That was a good hit in a tie game," Feliz said. "We haven't been scoring a lot of runs lately."

The players in the clubhouse barely noticed when Leo Nunez notched his 25th save to preserve Florida's victory over the Braves.

"That's good. That'll work," Ryan Howard said without glancing at the multiple flat-screen televisions.

Howard and Raul Ibanez each singled and Werth walked to load the bases in the fourth. Feliz then jumped on a first-pitch fastball from Lopez and sent it careening into the seats in left-center field for a 5-1 advantage.

It was the seventh career grand slam for Feliz and his second this season. It was also the 11th grand slam for the Phillies in 2009, extending a franchise record.

For a team struggling to hit in recent games, the early run support had to be extremely positive. Manager Charlie Manuel held a closed-door meeting before the game to try to ignite his team.

"It feels good," Howard said. "Just to go out there and relax and play is what we're doing. We're just trying to go out each day and win a game."

While Feliz and Werth supplied the offensive punch, J.A. Happ continued his push for National League Rookie of the Year with his 12th victory. The lanky left-hander allowed nine hits and four runs (three earned) in 5 2/3 innings and became the first Phillies rookie to record 12 victories since Jim Owens went 12-12 in 1959.

"It's a great thing," Happ said. "It was a good day. We'll come out now and see what happens tomorrow."

Kazuo Matsui's two-run home run with two outs in the sixth sent Manuel to the mound to lift Happ for 46-year-old veteran Jamie Moyer.

Moyer got the job done, retiring Miguel Tejada on a flyout to end the sixth and tossing a scoreless seventh. Moyer, however, limped off the field at the end of the seventh after appearing to land awkwardly following a pitch to Jeff Keppinger, who flied out to center field. The Phillies announced that Moyer suffered a left groin strain and his status for Wednesday's game is unknown.

Ryan Madson pitched two innings to pick up his 10th save in 16 opportunities. The fans roared when Madson trotted out to the mound for the ninth. Brad Lidge, who has a Major League-leading 11 blown saves, was warming up in the bullpen.

Since Madson got through the eighth on only nine pitches, he was called on for the ninth. With runners on first and second and two outs in the ninth, Madson unleashed a nasty 97-mile-per-hour fastball to strike out Hunter Pence looking.

"Warming up, I was thinking I was going two [innings]," Madson said. "Once I knew definitely I was going back in the ninth after sitting down and calming down, the crowd definitely got me going. It felt good. I was surprised. They made some noise and made it easier to go back out there."

Manuel considered going to Lidge but opted to stay with Madson after the short pitch count in the eighth.

"I was going to go to Lidge," Manuel said.

The Phillies' bats broke through against the Astros on this particular night. That's what ultimately changed the game early on.

"They did what they do best -- the long ball," Astros interim manager Dave Clark said. "The big grand slam from Feliz really, really put a damper on things for us. It's a pitch that Lopey left up. It looks like it was a hanging slider and he got a big part of the bat on it, and we all know if you hit the ball good here, it's a good chance to get out of the ballpark."

Another expected sellout crowd will have a chance to celebrate at the ballpark on Wednesday. Either a Braves loss or a Phillies win will clinch the NL East for the third straight year.

"The first step is clinching a spot," Howard said. "It's a long road once you get in there. The first step is getting in.