Updated

MIAMI (AP) — Ryan Howard had two hits and scored Philadelphia's first run in 31 innings on a triple by Raul Ibanez, Chase Utley drove in the go-ahead run and the Phillies snapped out of a dreadful slump to beat the Florida Marlins 3-2 on Friday night.

Wilson Valdez had two hits for the Phillies, who had been shut out in each of their last three games — all against the New York Mets — and in four of five overall. They avoided becoming the first team in 18 years to be blanked four straight times, something last done by the Chicago Cubs.

Jorge Cantu had two hits, while Chris Coghlan and Gaby Sanchez each scored for Florida, which dropped its third straight to fall under .500 at 24-25.

Kyle Kendrick (3-2) only made one big mistake for the Phillies in six innings, and that was an errant throw to first that allowed Florida to score both of its runs. Kendrick allowed five hits and no earned runs, striking out one.

Jose Contreras allowed a pair of one-out singles in the ninth, before closing out his third save in as many chances. He struck out Cody Ross looking with a 79 mph offering, then ended it by getting Ronny Paulino to fly out to shallow center field.

The power-hitting Phillies stranded two runners in the first, another in the second and went down in order in the third, before finally getting something going in the fourth.

Howard led off with a single off Chris Volstad (3-6), and Ibanez — hitting fifth for the first time all season, thanks to Jayson Werth getting the night off — connected on a hard line drive to center field. The ball skipped past Cameron Maybin, rolling toward the wall and turning into a triple that gave Howard plenty of time to score from first base.

It was the break the Phillies had been waiting, oh, about a week for.

Philadelphia lost 5-0 to Boston last Saturday and 8-3 to the Red Sox the following day, getting those runs in the ninth inning after being blanked by Tim Wakefield for the first eight.

From there, the Phillies headed out to face the Mets. Their bats never showed up, and the Phils were outscored 16-0 in the series.

"You've got to stay positive, man," Phillies manager Charlie Manuel said before Friday's game.

It worked.

Thanks to their leadoff hitter, and a goof by Kendrick, the Marlins opened the scoring with two runs in the third.

With two outs, Coghlan fouled off seven straight offerings in what became a 12-pitch at-bat, eventually hitting a sharp single to left. After another single, Kendrick nearly escaped when Hanley Ramirez hit a comebacker and started a slow jog to first.

But Kendrick rushed the throw, the ball sailing out of Howard's reach, and Coghlan and Sanchez scored for a 2-0 lead.

With the way the Phillies have been hitting — or not hitting — that lead might have seemed bigger than two runs.

Eventually, though, the two-time defending NL champions remembered how to score again. And after getting that first run, the Phillies started manfacturing runs to take the lead, stolen bases playing a huge role.

Utley hit a two-out single in the fifth, then stole second and scored when Howard singled one batter later. And in the seventh, the Phillies took their first lead in exactly seven days, aided nicely by Shane Victorino and Ben Francisco pulling off a double-steal. Utley's grounder off Taylor Tankersley scored Victorino, putting Philadelphia up 3-2.

Volstad gave up seven hits and three runs in 6 1-3 innings.

NOTES: Miami Dolphins QB Chad Henne threw out the first pitch. ... The Phillies kept Werth and Placido Polanco out of the starting lineup. Ross Gload started in right for Werth, Greg Dobbs started at third for Polanco. ... Marlins RHP Jorge Sosa, selected earlier in the day as the replacement for Dan Meyer — who was designated for assignment — made his first appearance in the majors since Sept. 5, for Washington against Florida.