Hamels will still be eligible for arbitration following the final year of the deal and free agency after the 2012 season.
The deal calls for Hamels to receive $4.35 million in 2009, $6.65 million in 2010 and $9.5 million in the final year of the deal. He will also receive an additional $500-thousand in the season following any year that he wins the Cy Young Award or $250-thousand if he finishes second or third in the balloting.
Hamels went 14-10 with a 3.09 ERA in 2008 and followed that up by winning four of five starts in the post-season, cementing MVP honors for both the NLCS and the World Series. In three seasons, Hamels is 38-23 with a 3.43 ERA.
The Phillies also avoided arbitration with Greg Dobbs by agreeing to a two-year, $2.5 million deal with the super-sub. Dobbs filled in at third base last season and was the club's leading pinch-hitter.