The club announced the agreement with the 28-year-old infielder-outfielder Friday, when the Rays returned home to Tropicana Field after the most successful road trip -- 9-1 -- in team history.
The first three years of the extension are guaranteed; the team holds options for the 2014 and 2015 seasons.
"The Rays gave me my first chance to be in the big leagues. ... There's no better clubhouse atmosphere," said Zobrist, who was first approached about the prospect of a long-term deal late last season. "This is definitely where I want to be."
Zobrist is making $438,100 this season. He was an All-Star for the first time in 2009, batting .297 with 27 homers and 91 RBIs to become the first player since Denny Hocking in 2001 to start games at seven positions.
He batted everywhere in the lineup except ninth last season. He has moved back and forth between second base and right field this year, and is hitting .258 with no homers and six RBIs in 15 games.
"As a strong defender both in the infield and outfield, his versatility is nearly unmatched, and his approach at the plate has made him one of the best switch-hitters in baseball," Rays executive vice president Andrew Friedman said. "He works hard, plays the game right, and is exactly the kind of player and person we want as part of this organization."
Tampa has a $7 million option for 2014 with a $2.5 million buyout and a $7.5 million option for 2015.
Information from The Associated Press was used in this report.