San Diego — The New York Yankees landed the biggest prize of the free agent market, adding Gerrit Cole to their rotation with a record $324 million, nine-year contract on Tuesday night, a person familiar with the deal told the Associated Press.

The person spoke on condition of anonymity because the agreement had not been announced.

Cole’s deal established marks for pitchers in total dollars and with its $36 million average salary, topping the $245 million, seven-year contract Stephen Strasburg finalized a day earlier to remain with the World Series champion Washington Nationals.

Agent Scott Boras negotiated both deals.

A 29-year-old right-hander, Cole was baseball’s most dominant pitcher for much of last season and helped the Houston Astros come within one win of their second World Series title in three seasons.

“Obviously, when you are talking about a player at the level of Gerrit Cole, in a lot of ways that’s a game-changing type talent,” Yankees manager Aaron Boone said earlier in the day.

New York has not won the World Series since 2009 and sought an ace to head a rotation that already includes Luis Severino, Masahiro Tanaka, James Paxton and J.A. Happ or Domingo Germán, who may be suspended at the season’s start under baseball’s domestic violence policy.

General manager Brian Cashman executed the move out of his same playbook he used after the 2008 season, when he gave CC Sabathia a $161 million, seven-year deal to lead a staff and establish a clubhouse presence.

Cole will compliment a young core of hitters that includes Aaron Judge, Gleyber Torres and Gary Sánchez, entering a window when New York thinks it can compete consistently for championships.

Cole was drafted by the Yankees in the first round with the 28th overall pick out of high school in 2008 but chose to go to UCLA, then was drafted first overall by Pittsburgh three years later. Traded after the 2017 season, he transformed his career in two seasons with the Astros.

After going 59-42 with a 3.50 ERA in five seasons with the Pirates, he blossomed under the analytics-focused staff of the Astros. He increased the usage of his four-seam fastball and curveball, virtually dropping his two-seam sinker while attacking the top of the strike zone more often.

He went 15-5 with a 2.88 ERA in 2018, then 20-5 with a 2.50 ERA a major league-high 326 strikeouts last season, finishing second to teammate Justin Verlander in AL Cy Young Award balloting. Just 4-5 in late May, he went 19-0 over his next 25 starts before losing the World Series opener. He won Game 5 and was available to pitch in Game 7 but was never used.

Cashman visited Cole and wife Amy in California last week, bringing along Boone, new pitching coach Matt Blake and special adviser Andy Pettitte.

“We’re just trying to make sure that we educate the player and his family about our culture, everything, what we are,” Cashman said.

Gregorius to Phillies

Free-agent shortstop Didi Gregorius is reuniting with manager Joe Girardi in Philadelphia, agreeing with the Phillies on a $14 million, one-year contract, a person familiar with the deal told the AP.

Gregorius spent the last five years with the New York Yankees, the first three playing for Girardi as Derek Jeter's successor at shortstop.

Girardi replaced Gabe Kapler as the Phillies' manager following a disappointing season in which Philadelphia faded to fourth place in the NL East. The team went 81-81 despite signing slugger Bryce Harper to a $330 million, 13-year contract.

Gregorius' 2019 debut was delayed until June 7 after Tommy John surgery on Oct. 17, 2018, to repair an elbow ligament torn during Game 2 of the AL Division Series at Boston. The left-handed hitter batted .238 with 16 homers and 61 RBIs this year, leaving him with a .264 average, 110 homers and 417 RBIs in eight major league seasons.

Nats keep Gomes, Kendrick

Doing their best to keep as much of their World Series roster intact as possible, the Nationals announced they re-signed catcher Yan Gomes and infielder Howie Kendrick on Tuesday, a day after bringing back Stephen Strasburg for $245 million.

Gomes agreed to a $10 million, two-year contract with salaries of $4 million next year and $6 million in 2021. Kendrick is guaranteed $6.25 million under a deal that includes a $4 million salary next year and a $6.5 million mutual option for 2021 with a $2.25 million buyout.

Mexico City to host game

The San Diego Padres and Arizona Diamondbacks will play each other in April in Major League Baseball’s first regular-season games in Mexico City.

The commissioner’s office said Tuesday the two games on April 18 and 19 will be at Alfredo Harp Helú Stadium, a 20,000-capacity ballpark that opened last year. Arizona will be the home team for both games.

Giant moves

Zack Cozart has had surgery on his left shoulder twice in two years.

The San Francisco Giants will wait patiently for the 2017 All-Star to heal.

They bolstered their infield by acquiring Cozart and prized prospect in Will Wilson in a trade with the Los Angeles Angels for a player to be named or cash.

San Francisco also announced it signed right-hander Kevin Gausman to a $9 million, one-year contract.

Cozart, if healthy after missing significant time in 2019 with shoulder and neck injuries, can play second or provide versatility behind third baseman Evan Longoria. The Giants are taking on Cozart’s salary for next year of $12,666,667. Cozart is eligible for free agency after 2020.

“He’s got a ways to go in rehab,” president of baseball operations Farhan Zaidi said. “He’s had a couple of shoulder surgeries. He’s swinging the bat, but he’s got a ways to go and we’re obviously going to do everything we can to help him get back on the field.

“All-Star in 2017, his last full season, so he can certainly help us if he’s healthy.”

Still, Zaidi said Cozart could be ready by opening day “if things go well.”

Wilson was the Angels’ first-round draft pick this year at No. 15 overall. The middle infielder batted .275 in rookie ball.

One of the top priorities for Zaidi was finding a starting pitcher during this week’s winter meetings, so Gausman fills a need. The team met with representatives for left-hander Madison Bumgarner, but there were few signs that a reunion was imminent. Zaidi declined to offer any details regarding the session but said the club is still having discussions on adding another starter.