Oklahoma City Thunder general manager Sam Presti has once again pulled a rabbit out of the hat by turning a difficult situation into a win for the franchise.

With Carmelo Anthony choosing to exercise his $28.9 million player option for next season, the team was facing the largest payroll in NBA history at $300 million.

After agreeing to part ways with the veteran and getting his contract off their books, it appeared the likeliest outcome would've been a buyout.

However, Presti worked his magic and found a trade partner in the Atlanta Hawks who were willing to take on Anthony's contract by offloading Dennis Schroder in return.

So the Thunder have managed to completely rid themselves of Carmelo's contract and have picked up a solid point guard as a bonus.

Win-win situation

The German became the full-time starter for the Hawks over the last two years as the team chose to trade Jeff Teague and build around him as their playmaker.

But the 24-year-old publicly declared that he wasn't happy to be part of a rebuilding team and was frustrated with finishing bottom of the Eastern Conference last season.

Atlanta drafted exciting young guard Trae Young with their lottery pick last month and are ready for a future with him.

Schroder couldn't hide his excitement at being traded to OKC as he took to Instagram to post a photoshopped image of himself in the team's jersey.

He'll be playing as a backup to Russell Westbrook and Paul George believes there isn't a better player in the league fulfilling that role.

“[Schroder] is hands down the best backup point guard in the league,” George said, per Thunder Wire.

“He’s that mid-tier star in our league; one of the best point guards in our league in general. I’m excited.

"We got another scorer, another playmaker and another savvy guy in our locker room that can help us win games.”

Despite the struggles the Hawks went through, the youngster is coming off a career year after averaging 19.4 points per game.

He also posted 6.2 assists and 1.1 steals and should be a perfect fit leading the OKC second unit.

His arrival will help them play faster and make use of the athleticism they have on their roster.

Presti deserves huge credit again for improving the team with this acquisition and they now have a squad that can help them make a serious challenge in the Western Conference next year.

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.