The Cleveland Cavaliers have swung a trade on the eve of LeBron James' official return to the team.

With media day Friday and the first day of training camp Saturday, Cleveland on Thursday night completed a deal with the Boston Celtics to acquire veteran guard Keith Bogans.

The Cavaliers got Celtics swingman Keith Bogans in a trade for Dwight Powell, John Lucas, Erik Murphy and Malcolm Thomas. D. Williams/Einstein/NBAE/Getty Images

The Cavaliers, as ESPN.com reported earlier Thursday, surrendered the non-guaranteed contracts of John Lucas, Erik Murphy and Malcolm Thomas -- as well as a player Boston intends to keep in forward Dwight Powell -- to acquire Bogans and his trade-friendly contract, which holds great appeal to Cleveland.

The combination of ‎Bogans' contract being non-guaranteed both this season at $5.3 million and next season at $5.5 million -- along with Brendan Haywood's fully unguaranteed $10.5 million salary in 2015-16 -- potentially gives the Cavs a combined $16-plus million in unguaranteed salary to dangle in trades for the 2015-16 campaign.

That's a significant amount of cap relief to offer trade partners for Cleveland, which also acquired second-round picks from Boston via Sacramento in 2015 and '17 that are top-55 protected.

Boston, meanwhile, gets a player it likes in Powell as well as second-round picks from Cleveland in 2016 and '17. Sources told ESPN's Jeff Goodman the Celtics also will create a trade exception worth $5.3 million as part of the transaction, which can be achieved by absorbing the various Cleveland players into existing trade exceptions.

The Celtics also waived Chris Johnson and Chris Babb on Thursday but still have 21 players on their books, requiring them to release at least two more players to make sufficient roster room to complete the long-anticipated signing of free-agent swingman Evan Turner before they open training camp Monday.

The Celtics, sources said, are next expected to waive Lucas and Thomas but do plan to bring Murphy to camp after the former Florida power forward played for Finland in the recent FIBA Basketball World Cup in Spain.

Lucas, Murphy and Thomas were all acquired by Cleveland from the Utah Jazz on July 22, with the Cavs intent on re-trading them at the first opportunity.

Bogans, 34, appeared in just six games for Boston last season but played in 74 for Brooklyn in 2012-13.

The 11-year veteran, known as a good team defender, a capable 3-point shooter and a strong locker-room presence throughout his career, has also played for Orlando (twice), Charlotte, Houston, Milwaukee, San Antonio and Chicago.

Powell is a 6-foot-11, 240-pound rookie drafted No. 45 overall by Charlotte in the second round in June.