The Chicago Cubs could have waited another couple of weeks, seen if their underachieving team might find its stride in July and evaluated a handful of trade possibilities ahead of the July 31 deadline. But why wait and let another 10 percent of your season go by when you already know what you are lacking, and where to find it?

On Thursday, just two days after the All-Star Game, a day before the start of the season’s unofficial second half, and a good 2½ weeks before the deadline, the Cubs pulled the trigger on a major trade to bolster their sagging rotation, landing left-hander Jose Quintana from their crosstown rivals, the Chicago White Sox, for four prospects. Quintana, 28, is 4-8 with a 4.49 ERA this season, but has never missed a start in his career and was an all-star as recently as 2016.

The cost to the Cubs was steep: One of the four prospects was 20-year-old outfielder Eloy Jimenez, MLB’s fifth-best prospect in Baseball America’s midseason rankings and a participant in Sunday’s Futures Game in Miami. Another was right-handed pitcher Dylan Cease, whose fastball touches triple-digits and who was the second-best prospect, behind Jimenez, in the Cubs’ organization. The other prospects were first baseman Matt Rose and infielder Bryant Flete. All four were at the Class A level and considered two or more years away from the majors, which indicates the White Sox valued long-term upside over an immediate impact at the big league level.

Rather that wait on teams such as Pittsburgh (Gerrit Cole), Toronto (Marcus Stroman) or Detroit (Justin Verlander) to decide whether they will be buyers or sellers this month, the Cubs jumped at the chance to strike a deal with a team that harbored no illusions of contending. The White Sox have been in a rebuilding phase for months now, having already traded Chris Sale (to Boston) and Adam Eaton (Washington) over the winter. While Thursday’s prospect haul didn’t match those from the earlier trades, the White Sox have lifted their farm system from among the worst in the game to among the best in the past eight months; they now boast seven of the top 100 prospects in the game, according to Baseball America, while the Cubs, now that Jimenez is gone, have none.

The Cubs, whose curse-breaking 2016 World Series title made them a pop-culture phenomenon, were arguably baseball’s most disappointing team in the first half, going 43-45 and falling 5½ games behind the Milwaukee Brewers in the National League Central. Even if they were to catch the Brewers, the Cubs appeared to be in no shape to take on the West-leading Dodgers or the East-leading Nationals in the playoffs. Despite assurances from Manager Joe Maddon, put forth as recently as this week, that the solution to the Cubs’ woes would be found within their own clubhouse, the front office clearly felt they needed reinforcements.

The Cubs already have a core of young position players that is the envy of baseball, but their rotation has been a mess all season. After leading the majors with a 2.96 ERA in 2016, Cubs starters have a 4.66 mark this year. The rotation possessed little stability beyond this season, with Jake Arrieta and John Lackey hitting free agency, and Jon Lester entering his mid-30s, when many starters begin to decline. Including club options, Quintana could remain under the Cubs’ control through 2020 at salaries that never rise above $11.5 million. The Cubs also expect Kyle Hendricks, the NL’s 2016 ERA champ, back from the disabled list in the coming days.

The Cubs and White Sox rarely make trades with each other, having gone 11 years — since Neal Cotts went from the south side to the north in exchange for David Aardsma — without such a deal before Thursday. Part of the motivation for the Cubs to move swiftly on Quintana was the growing number of additional teams that had interest in him, a list believed to have included the Astros and Yankees, as well as the team the Cubs are chasing, the Brewers.