The San Francisco Giants made a long-term commitment to pitcher Matt Cain on Monday, inking the right-hander to a five- year contract with a club/vesting player option for the 2018 season.

"Ensuring that Matt remained a Giant beyond this season was a top priority for the organization. Matt is an integral part of the team whose performance on the mound will be one of the keys to our success for years to come," said San Francisco general manager Brian Sabean in a release.

Terms were not disclosed per club policy, but the San Francisco Chronicle reported the deal to be worth $20 million per year with a $5 million signing bonus and a $7.5 million buyout for the 2018 season.

That would be the largest multi-year contract for a right-handed pitcher in history.

Cain posted a 12-11 record with a 2.88 earned run average in 33 starts, earning him eighth place in NL Cy Young voting and a place on the All-Star team for the second time.

San Francisco won all three games started by their former first-round pick in the 2010 playoffs, including a scoreless 7 2/3 inning start in Game 2 of the World Series en route to the Commissioner's Trophy.

"The success of our franchise depends on developing and retaining homegrown talent like Matt Cain," said San Francisco president and CEO Larry Baer. "This is an exciting day for Giants fans everywhere and a fantastic way to kick off the 2012 season."

Cain has a 69-73 record with a 3.35 ERA over his seven-year career with the Giants.