The Phillies began to clear their payroll four years ago and trade away their established high-priced stars as they kept an eye on what would await them in 2018. Each contract shed put them in better shape to not only spend big this winter in one of the most talent-rich free-agent classes but they also placed themselves in position to assume a hefty contract from a team that was looking to empty their roster the way the Phillies once did.

That positioning led the Phillies to Monday’s trade with Seattle to land All-Star shortstop Jean Segura and assume the $60 million he will make over the next four seasons. The Phillies also received righthanded reliever Juan Nicasio and lefthanded reliever James Pazos. The Phillies sent the Mariners former No. 1 prospect J.P Crawford and last winter’s free-agent prize Carlos Santana.

The Mariners will pay the remaining $40 million due to Santana while the Phillies assumed Segura’s $60 million and Nicasio’s $9.25 million for this season. By opting to take on the extra $30 million in salary, the Phillies added a strong defensive shortstop who is the type of hitter their lineup needs and found a way to move Rhys Hoskins back to the infield.

“It allows us to stay flexible. Whether we’re talking about roster flexibility or payroll flexibility or positional flexibility, flexibility is a big part of what we do in this game,” general manager Matt Klentak said. “This did not have a huge impact on the payroll and it allows us to stay flexible. We can continue to explore deals in other areas knowing that should have some payroll room to address that if necessary. But if it comes in the form of a trade, we can pursue that as well. This was a trade that accomplished several things for us, one of them being that it allows us to stay flexible for the rest of the offseason.”

Segura is not the centerpiece of the Phillies’ offseason, but instead a tablesetter for the big prizes the Phillies hope they can land latter this month. Adding Segura keeps the Phillies in the race for both Manny Machado and Bryce Harper. They are still awaiting a decision from starting pitcher Patrick Corbin and are exploring ways to upgrade their bullpen. This trade should be the first move in a busy offseason.

Segura makes contact at a high rate, has a solid approach with two strikes, and is one of the toughest hitters in baseball to strike out. He batted .304 last season with a .755 OPS. He paired the fifth-highest contact rate in the majors with the ninth-lowest strikeout rate. The Phillies had the lowest contact rate in the National League and struck out the third most in baseball.

Not only should Segura help fix some of last season’s glaring offensive deficiencies, but he should bring stability in the field. Segura registered five defensive runs saved last season while Phillies’ shortstops combined for -23, which was the third worst in baseball.

“A team that really didn’t get much production out of shortstop last season, to add an All-Star shortstop like Jean Segura moves the needle quite a bit, probably several wins,” Klentak said. “I think that’s important and I think as we’re trying to improve on an 80-win team to try to put ourselves in playoff contention we need to identify the areas where there are opportunities to make improvements like that and I think shortstop was an area for us. It’s why we were looking for potential upgrades in this area and it’s why we struck the deal to add Jean.”

The Phillies now have a clear opening in their outfield for Harper as Hoskins will return to first base. But even though Segura is a shortstop, the Phillies can still make room for Machado. Segura played almost exclusively at second base during a productive 2016 season in Arizona and could move there with the Phillies. Or the Phillies could use their vault to persuade Machado to return to third base as Segura plays shortstop.

Crawford moved quickly through the minors but failed to have much of an impact last year in his first full major-league season. Crawford began it as the Opening Day shortstop but was slowed by injuries. He played in just 49 games and batted .214 with a .319 on-base percentage. Crawford consistently reached base throughout his time in the minors but failed to hit much once he reached double A. He turns 24 in January and the Phillies were willing to part ways.

Nicasio pitched briefly for the Phillies in 2017 after they claimed him off waivers from Pittsburgh and traded him a week later to St. Louis. The 32-year-old struggled last season with Seattle and finished with a 6.00 ERA in 42 innings. The lefthanded Pazos had a 2.88 ERA last season in 50 innings with 8.1 strikeouts per nine innings. The 27-year-old has been more effective against righthanders than lefthanders so it is unlikely the Phillies would try him as a specialist. He also can be optioned to the minor leagues.

The trade also shows a willingness by general manager Matt Klentak to admit that he may have made a mistake. Signing Santana last December proved ill-fated. His offensive production dipped and Hoskins was out of position after being asked to make an uncomfortable transition to left field.

The general manager had long pined for Santana, but even Klentak could see that Santana didn’t fit with the Phillies. Klentak proved able to find a remedy. He not only moved Santana’s contract but acquired a quality player in return. Last year’s mistake did not simply result in a salary dump. It was a crafty move to start what could be Klentak’s defining month. But it started long before Monday.