Starlin Castro was barely out of his teens when he made his big league debut. Now it looks as though he'll still be donning Cubbie blue when he hits his 30s.

The Chicago Cubs and their young shortstop agreed to a seven-year contract with a club option for 2020, the team said Tuesday. The deal could keep Castro in Chicago until after his 30th birthday.

"Only the most talented players get to the big leagues at 20," said Cubs general manger Jed Hoyer. "I'm sitting here with a 22-year-old veteran right now. That was a big part of our decision.

"The way it was looking, Starlin was going to be a free agent way too early. He's a big part of our future. We have four years of control with him after this year. By doing this deal, we now have eight."

Castro is a two-time All-Star in just his second full major league season, and he led the National League in hits with 207 last season. Since making his major league debut on May 7, 2010, Castro has more hits than any player in the NL with 486.

"I want to be here for a long time and winning," Castro said. "My family (will) change, but nothing (will) change for myself. (The money is) not going to stop me from working hard every day on the field."

Castro was originally signed by the Cubs as a non-drafted free agent on Oct. 25, 2006. Terms of the new deal were not released by the team, but published reports have placed the guaranteed money at $60 million over the duration of the extension, a figure Castro was asked about in Tuesday's press conference.

"It's big, especially for my family, coming from very poor people," Castro said. "Now my family is going to be better, their lives changing."

Castro motioned toward his father, who was standing nearby, and said, "My dad wanted me to play baseball every time. He got me here."

While Castro's raw talent has always been evident, things have not always gone smoothly for a player who skirted with trouble off the field and suffered well-publicized mental lapses on it. He was accused of sexual assault following the 2011 season, though Cook County prosecutors declined to press charges, citing insufficient evidence.

Castro's on-field focus has also been questioned, most notably during a nationally-televised game last season when cameras captured him with his back to the plate as a pitch was being delivered.

Despite the occasional bouts with immaturity, the Cubs feel Castro is going to be a foundation player for a club just beginning its rebuilding process under a new front office regime headed by vice-president of baseball operations Theo Epstein and Hoyer.

"It's been fun getting to know Starlin as a person, but also watching him play every day," Hoyer said. "Shortstop is a really hard position to fill in today's game, especially with someone who can provide it with offence.

"There is no question in my mind that he can play shortstop in the big leagues on a championship team."

Castro whet the appetite of Cubs fans from the start, homering in his first career at-bat and setting a big league record with six RBIs in his debut. He was taken in by Cubs veteran Alfonso Soriano, a fellow Dominican who helped mentor Castro at the beginning of his career.

"He's very important," Castro said of Soriano. "When I first got here, he took me to live in his house. He talked to me about baseball and how important baseball is for you and your family."

Castro, a career .296 hitter, was batting .276 this season with 12 homers and 63 RBIs before Tuesday night's game against Milwaukee. He's struggled recently and admitted he might have been slightly distracted by the negotiations between the Cubs and his agent, Paul Kinzer.

"It'll be interesting to see if there is any change now that this thing is behind him and he'll be here for a long time," said Cubs manager Dale Sveum. "When you get that first contract, you can relax and realize that there really is only one thing to play for and that's winning the World Series."