Updated

The Oakland Athletics realized the need to keep their young rotation intact, and getting Trevor Cahill for the long haul was a big key.

The A's and their All-Star righty reached agreement Monday on a new five-year contract worth $30.5 million, which takes him through all three of his arbitration-eligible seasons and first potential year of free agency.

"It feels good. I came up with them and I'm just glad they gave me the opportunity to lock me up and I'm guaranteed to pitch for a while, so I couldn't be happier," Cahill said in Chicago before the A's played the White Sox.

The 23-year-old Cahill is 1-0 with a 1.42 ERA in two starts this season. He was the A's opening day starter after winning 18 games last year with a 2.97 ERA in his second season in the majors. Cahill was a prime reason Oakland led the AL in ERA (3.56) and shutouts (17) in 2010 while holding opponents to a .245 batting average.

"We've seen already through nine games how critical the starting rotation is to our success," assistant general manager David Forst said. "It's something we talked about during the offseason, to ensure we keep these guys through the years we control and beyond."

Cahill had been slated to earn $440,000 under the contract he agreed to on March 7. The new deal includes a $1 million signing bonus and salaries of $500,000 this year, $3.5 million in 2012, $5.5 million in 2013, $7.7 million in 2014 and $12 million in 2015.

Oakland has a $13 million option for 2016 with a $300,000 buyout. If that option is exercised, the A's can exercise a $13.5 million option for 2017 with a $500,000 buyout. The 2017 option price would escalate to $14 million if Cahill finishes among the top two in Cy Young Award voting in any year from 2011-16.

"I think it's great for everyone involved," manager Bob Geren said. "We are obviously very happy with him and his performance. I'm sure he is thrilled to death to get a deal on his end. Everybody is happy around here. He is a guy that works, that takes care of himself, he's a good person off the field and look forward to having him for a long time."

Cahill, a second-round draft pick in 2006, is 29-21 lifetime and was a first-time All-Star last year.

He is happy with the timing — after a breakout showing in 2010.

"I was joking with (GM Billy Beane) if they would've signed me if they were sending me down to (Triple-A Sacramento), I would've signed for almost anything," Cahill said. "But just having patience and having confidence that I can go out there and I can turn my career around without having a great first year, I think that definitely paid off."

Last April, Brett Anderson — also a second-rounder in 2006 who came up the same time as Cahill — received a $12.5 million, four-year contract that includes team options for 2014 and 2015. The total value of the deal could reach $31 million.

Cahill looks forward to pitching with Anderson and throwing to catcher Kurt Suzuki for years to come.

"I'm a guy that feeds off being comfortable in the clubhouse and it makes a lot easier knowing they are going to be here also and kind of feeding off their long-term deals and it kind of just makes things more comfortable," Cahill said.

___

AP freelance writer Patrick Rose in Chicago contributed to this story.