The 76ers’ deal to send Jimmy Butler to the Miami Heat hit a snag, but the sign-and-trade was finalized with the help of the Los Angeles Clippers and Portland Trail Blazers.

On Sunday, the Sixers agreed to sign Butler to a four-year, $142 million contract and trade him to the Heat. In return, they would receive Josh Richardson.

The Sixers and Heat had at least one more team to get involved to make the deal work. On Sunday, that third team was believed to be the Dallas Mavericks. However, the Heat and Mavericks apparently didn’t sort things out.

The Mavs got involved thinking they would acquire Kelly Olynyk and Derrick Jones Jr., the former Archbishop Carroll standout, in the deal. But the Heat didn’t want to surrender Jones and they needed to trade Goran Dragic to make the cap money fit.

Unable to sort out the missing $1.7 million on Miami’s end, the Heat and Sixers looked for more trade partners.

Finally, on Monday, four teams came to an agreement: The Sixers sent the rights to Mathias Lessort to the Clippers, according to a league source. The Clippers will also receive a future first-round pick from the Heat and acquired Maurice Harkless from the Portland Trail Blazers.

Dragic is no longer involved in the deal.

The Sixers drafted Lessort in the second round in 2017, and the French power forward has been stashed overseas.

It appears the Sixers had no intention of bringing Butler back. ESPN reported that they did not offer him the five-year maximum or four-year maximum salary. They had to know he would leave if one of those two options wasn’t on the table. A source in Butler’s inner circle disputed the report.

Richardson, a 6-foot-6 swingman, is regarded as a poor man’s Butler. He doesn’t handle the ball as well, but he did average a career-high 4.1 assists to go with a career-best 16.6 points this past season, his fourth in the league.