Carmelo Anthony has finally been moved on from his situation at the Oklahoma City Thunder via trade, but there's a twist.

The Thunder have sent Anthony to the Atlanta Hawks, where his $27.9 million expiring contract for the 2018-19 season is expected to be waived, according to Adrian Wojnarowski of ESPN.

Then, this would allow for either the Houston Rockets or the Miami Heat to pick up the 10-time All-Star once he is waived by the Hawks.

The trade

The complete trade is actually a three-team trade between the Thunder, Hawks, and the Philadelphia 76ers, with Melo only being a part of that trade.

Oklahoma City will send Melo and a 2022 protected first-round pick to the Hawks in exchange for guard Dennis Schroder and forward Mike Muscala.

The 2022 first-round pick is protected 1-14, and it becomes two second-round picks if not conveyed in that first year.

The Thunder will then send Muscala on to the 76ers, in exchange for forward Timothe Luwawu-Cabarrot, while Philadelphia will also send guard Justin Anderson to Atlanta.

While a waive-and-stretch provision on Anthony's $27.9 million contract could have saved the Thunder $107 million, a trade allows them to save slightly less money and improve their roster.

The stretch provision would have left $9 million-plus a year on the Thunder's books for the next three years, so Schroder's $15.5M per year deal is a bargain. He's also an asset that could stay or be traded again.

Once Melo is waived by the Hawks, the Rockets are the reported front-runners for his signature, while the Heat is also in contention for the 10-time All-Star as well.

The 34-year-old is coming off his worst season in the NBA, as he posted career lows in scoring average and field goal percentage last season. He averaged 16.2 points on 40.4-percent shooting.

He came to a mutual understanding with the Thunder that his scaled-back role with the team isn't what he wants, so it was always likely that he would sign with a new team this summer.

The Carmelo Anthony era is officially over for the Oklahoma City Thunder. Now it's just a case of if he's going to Houston or Miami.

CLICK HERE to listen to Episode Two of the new GiveMeSport NBA podcast, featuring New York Times senior writer Marc Stein. Subscribe for all future episodes.