The Brooklyn Nets have agreed to trade DeAndre Jordan, four future second round picks and $5.78 million to the Detroit Pistons for Jahlil Okafor and Sekou Doumbouya.

The Nets will save approximately $47 million in salary and luxury tax payments with the deal.

Detroit plans to work on a buyout with Jordan on the $20 million remaining over the final two seasons of his deal.