CHICAGO — The Cubs and White Sox pulled off a blockbuster deal with the White Sox sending lefty Jose Quintana to their crosstown rivals for Cubs top hitting prospect Eloy Jimenez as well as top pitching prospect Dylan Cease.

The Cubs are also sending Single-A infielders Matt Rose and Bryant Flete to the White Sox to complete the deal.

Jimenez, a 20-year-old outfielder, is the No. 5 prospect in baseball, according to ESPN’s Keith Law.

Quintana, 28, is 4-8 with a 4.49 ERA this season after going 13-12 with a 3.20 ERA last year. He has a career 3.51 ERA and fills an immediate and long-term need for the Cubs as they’re short on starting pitching. They rank eighth in the National League in starter’s ERA plus employ pending free agents John Lackey and Jake Arrieta.

“It is always extremely difficult to trade a person and player like Jose Quintana,” White Sox general manager Rich Hahn said in a statement, “but difficult as it was, this deal moves us closer to our goal of building a team capable of contending for multiple championships over an extended period of time. Jose, our scouts and coaches throughout the organization deserve a tremendous amount of credit for his development from a minor league free agent signee to one of the most sought-after talents in the game.”

The Cubs have been looking to add to their pitching staff, which has performed much worse this season that in last year’s World Series run, but they did not want a rental. Quintana is under contract through 2020, earning $8.85 million, $10.5 million and $11.5 million in 2018-20.

After dominating the National League last season on the way to a World Series title, the Cubs enter the second half this season at 43-45 and 5.5 games behind Milwaukee in the Central Division.

The White Sox are in last in the AL Central but have now made a series of trades that leave them with one of the best crop of prospects in baseball.