Cole Hamels pitched seven strong innings as the Phillies beat the Pirates in Pittsburgh in a July 4 matinee.
The Phillies' 6-4 win allowed them to finish a 10-game road trip even at 5-5.
It also gave them a series win over baseball's best team. The Phils (41-45) took two of three from the Bucs (52-32).
Hamels earned his first win since June 5. He is now 3-11 on the season.
The star lefty allowed just five hits over his seven innings, striking out eight and walking none.
The Phillies plated five total runs in the fifth and sixth innings to open up a comfortable lead for Hamels.
Center fielder Ben Revere went 3 for 5 with two RBIs hitting out of the lead-off spot for the Phillies, and Delmon Young stayed hot, going 2 for 4.
Jonathan Papelbon picked up his 17th save of the season.
The Phillies open a 10-game home stand tonight against the Braves. The scheduled starters are Cliff Lee and Tim Hudson.