Longoria was already under contract through 2016, so the new deal keeps him in Tampa through 2022. The Rays also have an option for 2023.
"We drafted Evan in 2006 with the belief that he and the organization would grow with each other and together accomplish great things," Rays principal owner Stuart Sternberg said in a statement. "That is why the Rays and Evan signed a long-term contract in 2008, and it is why we are extending our commitments today. Evan has clearly become a cornerstone player and a fixture in our organization. We are proud of what we have accomplished these past seven years, and I expect the best is yet to come."
Longoria, 27, is a three-time All-Star and has two Gold Gloves. He was limited to 74 games last season because of a partially torn hamstring. He hit .289 with 17 home runs and 55 RBI.
He is expected to be 100 percent when spring training begins after having surgery on the hamstring last week.
AL Cy Young Award winner David Price congratulated his teammate via Twitter: "wow @Evan3Longoria we breaking bread over here my brotha...lol happy to see you get paid...I'm sure it feels great!!!" Price wrote.