The Cubs and shortstop Starlin Castro have officially agreed to terms on a seven-year deal that includes a club option for an eighth season in 2020.

Castro leads the National League with 486 hits since making his major league debut on May 7, 2010. He became the youngest player and the first 21-year-old in history to lead the N.L. in hits in 2011.