Seeking to bolster a lineup that they believed needed a significant power boost, while also trying to account for attrition in the process, the Giants acquired longtime Rays third baseman Evan Longoria in a trade on Wednesday.In parting with their best player in franchise history, the Rays' return included center

Seeking to bolster a lineup that they believed needed a significant power boost, while also trying to account for attrition in the process, the Giants acquired longtime Rays third baseman Evan Longoria in a trade on Wednesday.

In parting with their best player in franchise history, the Rays' return included center fielder Denard Span , and three of the Giants' Top 30 prospects, per MLB Pipeline: infielder Christian Arroyo (No. 1), left-hander Matt Krook (No. 25) and right-hander Stephen Woods (No. 29). Tampa Bay also sent San Francisco cash considerations.

• Hot Stove Tracker

The trade fits immediate needs for both clubs. San Francisco was seeking a jolt to a lineup that ranked last in the Majors in home runs (128) and slugging percentage (.380), and looking for an established veteran to fill that void. Longoria, a three-time All-Star who is a career .270/.341/.483 hitter with 261 homers, 892 RBIs and 780 runs scored, has an established track record of stability. He has played in 798 games the last five years, more than any player in the Majors.

"This move fills an important need for our club and completes one of our offseason goals," Giants executive vice president of baseball operations Brian Sabean said. "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. Moving forward, we will continue to work on additional opportunities to improve the club for 2018."

The Rays were motivated to trim payroll this offseason, but were more prominently linked to potentially dealing pitchers Chris Archer and Alex Colome, who led the Majors with 47 saves last year. They had a minimal time frame to deal Longoria, who signed a six-year, $100 million extension beginning in 2017, as he was nearing full 10-and-5 rights three days into the 2018 season, which would have allowed him to veto a trade to any club. Longoria is owed $81 million through '22 with a $13 million team option for '23, and he will receive a $2 million bonus for being traded, according to the Tampa Bay Times.

"Erik and Matt and the front office have been very open and communicated from Day 1," Longoria said. "They kind of, not without letting me dictate it on my own terms, were very open to letting me go somewhere where they felt like I had the best opportunity as a player to win, and also for them to be able to accomplish what they want to accomplish in trying to rebuild the franchise. I was very clear to them that my hope was that if this did happen, that it would be a win for both sides."

Longoria, 32, was the Rays' first-round Draft pick in 2006 and he blossomed into the face of the franchise during the club's four postseason runs, including the American League pennant-winning run in 2008. Despite significant turnover from their playoff years, having seen David Price , Benjamin Zobrist , James Shields , Melvin Upton Jr., Scott Kazmir and other All-Stars depart via trade or free agency, as well as manager Joe Maddon, Longoria remained the club's cornerstone. He has been widely praised for his loyalty and leadership.

"Evan is our greatest Ray. For a decade, he's been at the center of all of our successes, and it's a very emotional parting for us all," said Rays principal owner Stuart Sternberg. "I speak for our entire organization in wishing Evan and his wonderful family our absolute best."

Longoria won his third Gold Glove Award at third base last year, but he dipped slightly at the plate, hitting .261/.313/.424 with 20 homers and 86 RBIs. The Giants, who play home games at pitcher-friendly AT&T Park, are likely hoping that Longoria regains the offensive prowess he showed in 2016, when he hit a career-high 36 homers. Giants manager Bruce Bochy envisions batting Longoria third or fourth, which would give him flexibility with first baseman Brandon Belt and catcher Buster Posey, who largely occupied those spots in '17. With Span gone, the club will have a void at leadoff.

"The numbers say that's where he should hit. It'd be somewhere in the heart of the order," Bochy said of Longoria. "I'll just wait and see exactly where we're at when this is all said and done … I think when you talk about the elite third basemen in the game, Evan's name is going to be there."

San Francisco had a glaring need at third base since Pablo Sandoval left in free agency after its World Series run in 2014. The Giants signed free agent Casey McGehee in '15, but after struggles, they turned to prospect Matt Duffy , who appeared in line to take over long term before he was traded to the Rays in '16. At that point, they acquired Eduardo Nunez , a productive fit when healthy, though he battled injuries during his one-year stint by the Bay. That opened the '16 postseason door for Conor Gillaspie , who was designated for assignment last year. The Giants traded Nunez, a .313 hitter in '17, to Boston last summer, then split time between Kelby Tomlinson and Sandoval, who signed late in the season to a Minor League deal and struggled mightily.

"One of the priorities for us was third base," Giants general manager Bobby Evans said. "Evan, as Brian mentioned, the consistency of his play -- 150-plus games every year and just his overall approach to the team, his presence in our lineup, in our clubhouse -- he's sorely needed."

Evans said the Giants had looked at Longoria, who hails from Southern California and still has much family in the area, as a third-base option in their end-of-season confab, and began engaging the Rays at last week's Winter Meetings.

With Wednesday's trade, the Rays have positioned themselves for the future. In adding Arroyo (the No. 56 overall prospect), who was the centerpiece in the return, Tampa Bay now has seven of MLB Pipeline's Top 100 Prospects.

Arroyo, who rooted for Tampa Bay-area teams like the Rays growing up, made his MLB debut last year to much fanfare after surging through the Minor League ranks. The Giants' first-round pick in 2013, he earned his first callup in April, but struggled to a .192/.244/.304 slash line in 135 plate appearances over 35 games, was sent down in June, then missed a bulk of time after injuring his wrist and breaking his left hand.

"[Arroyo] has a tremendous opportunity to bring new life to that organization," Longoria said of his trade counterpart. "That was kind of the way I looked at it when I was a young player, and I think he'll have the same opportunity. I know that it's probably hard for the fan base to see right now. But obviously in the recent past, you look at what the Astros did, and I think that's kind of the arc that the Rays would like to take now and build a core group of young players that they can build off of."

Krook, 23, was the Giants' fourth-round pick in 2016, though he was on track for a career with the Marlins before a post-Draft physical raised concerns over his pitching shoulder, thus nixing the $1,587,700 deal he had in place as their supplemental first-round pick in 2013. The Giants have been patient with the left-hander, whom they hoped to develop as a starter.

Woods, 22, was interestingly enough a Rays sixth-round pick in 2013, but he turned down their offer to attend the University of Albany, where he went 7-16 with a 6.10 ERA over three years. He was the Giants' eighth-round selection in '16.

Span, 33, hit .268/.330/.402 with 23 homers, 96 RBIs and 143 runs scored as the Giants' primary leadoff hitter the last two seasons, playing in 272 games. Span struggled in AT&T Park's spacious gaps with -12 Outs Above Average, per Statcast™, worst among center fielders. The 10-year veteran, who was born and lives in Tampa, Fla., also spent five years in Minnesota and three years in Washington, is owed $11 million in 2018, with a $12 million team option in '19 that includes a $4 million buyout.

Fantasy spin | Fred Zinkie (@FredZinkieMLB)

After a power decline in 2017 (20 homers, .163 ISO), Longoria will now play home games at pitcher-friendly AT&T Park and join a lineup that ranked 29th in baseball with 639 runs scored last season. Still, the slugger will not be dismissed as a mixed-league option by owners who remember his 36-homer, 98-RBI campaign in 2016. Longoria's arrival to the Bay Area should be a boon for the fantasy value of catcher Buster Posey , who will have greater lineup support next season. Meanwhile, Span -- who possesses solid speed and tallied a career-best 12 long balls a year ago -- could help those in deep mixed leagues if he secures a starting job and a premium lineup spot in Tampa Bay.