Roy Halladay pitched seven effective innings and the Philadelphia Phillies snapped a season-high four-game losing streak, beating the Pittsburgh Pirates 7-3 on Sunday to avoid a sweep.
Neil Walker hit a two-run homer in the first inning, one of six Pittsburgh hits off Halladay (8-3), who had six strikeouts and one walk in tying for the most wins in the majors.
Ryan Howard had three RBIs, Chase Utley was on base four times and Placido Polanco had two hits and scored twice for Philadelphia.
Playing without leadoff hitter Jimmy Rollins (bruised knee), the struggling Phillies offense _ seven runs in the previous four games - broke out with 14 hits and was aided by seven walks, two hit batters, two wild pitches and a passed ball.
The Phillies had only one hit during the fourth and fifth innings when they scored their first three runs. But they banged out 11 hits over the final four innings.
Halladay avoided the distinction of allowing 10 or more hits for three consecutive starts for the first time in his career.
With two outs in the sixth of what was then a two-run game, Brandon Wood and pinch-hitter Matt Diaz singled off Halladay. Pinch-hitter Jose Tabata then sharply lined the first pitch he saw toward right, but second baseman Utley extended for a spectacular diving catch to end the inning.
Raul Ibanez earned his 1,000th career RBI on a sacrifice fly in the fourth, and the Phillies scored twice in the fifth after James McDonald was pulled upon throwing 12 consecutive balls to load the bases with nobody out.
McDonald (3-4) came in having allowed only four runs in his previous three starts but had control issues, walking five, hitting a batter and throwing two wild pitches in four-plus innings.
Walker sent a high cutter from Halladay to right-center for his eighth homer of the season, giving him a team-high 39 RBIs - most among National League second basemen.
Pittsburgh added a run in the eighth off Jose Contreras to pull within 5-3, but Antonio Bastardo struck out Garrett Jones with two on to end the inning.
Polanco and Shane Victorino had RBI singles for the Phillies, who completed a 4-5 road trip.
Fan, follow and download: Get the latest from NBCPhiladelphia.com anytime, anywhere. Follow us on Twitter, Facebook and NBC Philadelphia. Sign up for our sports newsletter. And, get breaking news delivered right to your mobile phone -- just text PHIBREAKING to 639710 to sign up. (Message and data rates may apply.)