Red Sox fans have read this story before. A popular and speedy center fielder becomes a free agent and decides to switch sides in baseball’s most heated rivalry, agreeing to a big contract with the hated Yankees.

Johnny Damon did it in 2005 and Jacoby Ellsbury followed the same template Tuesday night, coming to terms with the Yankees on a seven-year deal worth $153 million, according to major league sources.

Ellsbury was scheduled to arrive in New York for a physical Wednesday morning. The contract includes a $16 million option for 2021.

The Yankees, because of their payroll, always were considered contenders for Ellsbury despite claims they planned to control spending on free agents. The Rangers and Mariners were considered more likely destinations for Ellsbury.

After negotiating with Carlos Beltran over the weekend, the Yankees turned to Ellsbury and the agreement came together quickly.

Ellsbury’s contract was a coup for agent Scott Boras in that it eclipsed the seven-year, $142 million deal the Red Sox signed Carl Crawford to before the 2011 season.

That deal was one the Red Sox quickly came to regret as Crawford battled injuries and lofty expectations before being traded to the Dodgers in 2012.

The Yankees are taking a somewhat similar risk. Ellsbury, 30, is a dynamic player who finished second in the American League MVP voting in 2011, hitting .321 with 32 home runs and 105 RBIs.

But in the two years since, Ellsbury has hit 13 home runs and driven in 79 runs over 880 at-bats. Going back to 2010, Ellsbury has played in 384 of a possible 648 regular-season games, only 59 percent.

Cracked ribs limited Ellsbury to 18 games in 2010. In 2012, a shoulder injury led to a three-month stint on the disabled list. Ellsbury broke a bone in his right foot last season and missed 16 games in September.

Ellsbury rebuilt his value last season, hitting .298 with a .781 OPS. He had 48 extra-base hits and stole 52 bases in 56 attempts. He bounced back from a foot injury to hit .344 in the postseason with 14 runs scored and six steals in seven attempts to help lead the Red Sox to the World Series title.

Ellsbury is a career .301 hitter in 38 postseason games, something that also appealed to the Yankees.

Unlike Crawford, Ellsbury has spent seven seasons with the Red Sox in a fan and media atmosphere very much like that in New York. His transition in that sense should be an easy one. In a clubhouse loaded with notable players, Ellsbury will not be the focus of attention.

The Sox tried for several years to sign Ellsbury to an extension knowing that he likely would go to free agency to determine his value. Negotiations continued after the season with the Red Sox hoping to stay at approximately $100 million. But that was something the Yankees soared past.

Ellsbury, who made the All-Star team once, leaves the Red Sox with 241 stolen bases, third in team history. He set their season record of 70 in 2009.

The Sox will receive a supplemental first-round draft pick as compensation, as Ellsbury was a qualified free agent.

The Red Sox could turn to 23-year-old Jackie Bradley Jr. as their new center fielder. But they have engaged in talks with the Los Angeles Dodgers regarding two-time All-Star Matt Kemp.

General manager Ben Cherington has said he prefers to keep Shane Victorino in right field. But the Sox have the option of obtaining a right fielder and shifting Victorino to center.