The Rays get back third baseman Christian Arroyo, outfielder Denard Span, and pitchers Matt Krook and Stephen Woods.
The 32-year-old Longoria leaves Tampa Bay as the longest-tenured player in franchise history, after spending almost 10 seasons in a Rays uniform. Longoria will make $13.5 million next season.
San Francisco had been trying all offseason to procure a potent bat to anchor its lineup and finally found its man in Longoria, a career.270 hitter with 261 home runs in 10 Major League Baseball seasons.
Longoria, 32, was drafted by the Rays as the third overall pick in the 2006 draft.
USA and North Korea trade angry recriminations at UN Security Council meeting
The White House immediately put out a statement that contradicted him: "The president's views on North Korea have not changed". In October the American president dismissed his Secretary of State's push for talks with the North.
After trading Eduardo Nunez at the trade deadline previous year, the Giants had tried minor leaguers like Ryder Jones and even former Giant, Pablo Sandoval.
Span, 33, hit.272/.329/.427 with 12 home runs and 12 steals with the Giants last season. Prior to the deal, San Francisco already had more money committed to players in 2019 and 2020 than any other franchise in baseball, so the Giants are taking another risk by adding to that existing payroll. They have filled a void at third base, but still have a lot of work left to do to catch Los Angeles, Arizona and Colorado in the NL West. The Tampa Bay Rays bid farewell to their franchises best player, and closes the door on an era which saw a number of year of prosperity large in part due to their superstar third baseman. Longoria represents a significant upgrade both offensively and defensively, but how much of one is he going to be will depend on which Longoria shows up. "Evan has been one of the best third basemen in the game over the last decade, and we are thrilled to add him to the organization". He would cash in after the 2012 season by signing a $100 million extension that didn't kick in until 2017, but playing at what amounted to far below market value for almost a decade ensured his continued presence at the Trop.
Arroyo is the real prize of the deal for the Rays.
As part of the assignment bonus, Tampa Bay owes Longoria $1.5 million on December 15, 2025, and $2 million on December 15 in each of the following four years. Longoria ended that season in the World Series. The Giants had been linked throughout the winter to free agent third baseman Mike Moustakas, but signing him would have cost the Giants a 2018 draft pick and worldwide bonus-pool money - added costs they weren't willing to take on.