The Brooklyn Nets and Deron Williams have agreed upon a buyout on the final two seasons of his deal. 

Williams will receive $27.5 million of his remaining $43 million with the Nets. The Nets will use the stretch provision to make his cap number $5.5 million through 2020.

Williams will sign a two-year, $10 million deal with the Dallas Mavericks.