Carlos Correa, a top draw in baseball's free agent market, has found a home in the Bay Area.

The 28-year-old shortstop, the Twins' MVP last season, agreed to a 13-year, $350 million deal with the San Francisco Giants on Tuesday night.

The contract — which ties Bryce Harper for the longest free agent deal — is also the fourth-highest guaranteed pact. It was reported by several media sources.

Mike Trout got a $426.5 million, 12-year contract with the Los Angeles Angels, Mookie Betts has a $365 million, 12-year agreement with the Los Angeles Dodgers and Judge, the new AL home run champ and MVP, is getting $360 million for nine years to remain with the New York Yankees pending a physical.

MLB Network's Jon Morosi reported that the Twins offered Correa $285 million over 10 seasons, which would have had more average annual value ($28.5 million to $26.9 million). The agreement with the Giants is a no-trade with no opt outs.

The former Astros standout joined the Twins in March on a three-year deal for $105 million, but had an opt out after each season as arranged by his agent, Scott Boras. And Correa took it.

It's been a lucrative market for free agent shortstops. Xander Bogaerts got an 11-year, $280 million deal from the Padres, and Trea Turner signed with Philadelphia for 11 years and $300 million.

Dansby Swanson, a World Series champion with Atlanta, remains unsigned.

Correa was the No. 1 pick in the 2012 draft, just ahead of future teammate and Twins centerfielder Byron Buxton. The Puerto Rico native went on to have an incredible start to his career with the Astros, making his MLB debut at 20 years old — becoming the 2015 American League Rookie of the Year — and going on to make the playoffs six of his seven season there. With the Astros, he made the World Series three times, winning it in 2017.

But while Correa enjoyed much success there, including a couple Golden and Platinum Gloves, he was also a part of the 2017 sign-stealing scandal, something that still garners him boos aplenty on the road.

With the Twins, Correa became a leader off the field. On the field, he brought consistency and excellence to a position where the Twins have lacked stability. And at the plate, he produced 22 home runs with a .291 batting average. He played 136 games, missing only two weeks because of a bruised finger. He played his best offense in the final months of the season, hitting .355 in September and October.

While the Twins couldn't maintain their early hold on the AL Central, Correa shared how much he and his family — including wife, Daniella, 1-year-old son Kylo and another baby on the way — enjoyed being in Minnesota. But he also was clear about his own worth.

"When I go to the mall, and I go to the Dior store, when I want something, I get it. I ask how much it costs, and I buy it," Correa said rather infamously after a late-September game. "If you really want something, you just go get it. I'm the product here. If they want my product, they've just got to come get it."

Brandon Crawford, a three-time All-Star, has been the Giants' shortstop since 2011. Crawford, who turns 36 next month, slumped to a .231 average with nine homers and 52 RBIs last season, down from a .298 average with 24 homers and 90 RBIs in 2021.

Crawford has a $16 million salary in 2023, then can become a free agent. He has dealt with injuries in recent seasons and might consider retirement at the conclusion of his deal, so the Giants were searching for a shortstop of the future.

The Giants went 81-81 last season, a year after posting a franchise-record 107 wins.

Correa was selected by Houston with the No. 1 overall pick in the 2012 amateur draft, and he played a key role in the Astros' rise from the bottom of the AL West to the franchise's first World Series title in 2017.

He hit a career-best 26 homers in 2021 in his last year with Houston, also finishing with a .279 batting average and 92 RBIs. He earned his second All-Star selection and first Gold Glove.

Just last weekend, Correa joined many of his former Astros teammates in Las Vegas for an Ultimate Fighting Championship event.

Correa, the 2015 AL Rookie of the Year, has a .279 career average with 155 homers and 553 RBIs in eight big league seasons. He also has been a stellar postseason performer with 18 homers and 59 RBIs in 79 games.

The Associated Press contributed to this report.