Former All-Star point guard Deron Williams has agreed to join his hometown Dallas Mavericks upon clearing waivers, sources told ESPN's Marc Stein. Sources say Williams will sign a two-year contract worth about $10 million with the Mavs.

The negotiations come in advance of Williams clearing waivers after he swiftly secured a buyout with the Brooklyn Nets, sources said. Williams would clear waivers 48 hours after his release by the Nets, which was officially announced Saturday.

NBA.com first reported Williams' buyout Friday. Earlier Friday, ESPN.com reported that Williams was pressing the Nets to release him so he could sign with the Mavericks, who famously lost a free-agent faceoff for the point guard's services in the summer of 2012.

Sources say the Nets will buy out the remaining $43 million on Williams' contract for $27.5 million, with payments to him spread over the next five seasons. The money Williams earns from the Mavericks would be on top of what Brooklyn owes him as part of the divorce.

It's unlikely another team will claim Williams because he has underperformed since signing a max contract to stay with the Nets in 2012.

Sources familiar with the ‎Nets' thinking told Stein that Brooklyn is now intent on keeping Joe Johnson. The Nets had been shopping him because Johnson's contract was deemed more tradeable than Williams' deal, but manufacturing an exit for Williams, as one source described it, was always "the preferred route."

The Williams buyout is poised to solve the bulk of Brooklyn's luxury tax issues, so it behooves the Nets competitively to keep Johnson next season, since they have already traded away their 2016 first-round pick and can't improve their lottery chances by going into a rebuild mode.

Brooklyn's attempts to trade Williams went nowhere, with a limited trade market seemingly getting thinner. The Sacramento Kings pondered trading for Williams last season, but it's believed the Kings were no longer interested after striking a one-year, $9.5 million deal in free agency with Rajon Rondo.

The Mavericks, sources said, did not pursue a trade for Williams because of the salary-cap space such a move would eat up.

The Mavs famously lost out to the Nets in a heated recruiting battle for the Dallas-area native in the summer of 2012, but Williams' stock as a Net declined considerably since he agreed to that five-year, $99 million deal to stay with Brooklyn.

Dallas has a significant hole at point guard after its failed Rondo experiment, while sources say Williams is eager for a fresh start after four long seasons. Dallas emerged as his preferred destination, sources said, in part because he could reunite with new Mavs guard Wesley Matthews, his former Jazz teammate.

Williams' wife, Amy, tweeted a thank-you to Mavericks owner Mark Cuban on Friday night.

Williams averaged 13.0 points and 6.6 assists per game last season while shooting a career-worst 38.7 percent from the field.

ESPN's Mike Mazzeo and The Associated Press contributed to this report.