Dwyane Wade has said he would like to end his career where he started it -- with the Miami Heat. He will get his chance.

As part of a massive team makeover, the Cleveland Cavaliers traded Wade to the Heat before Thursday's 3 p.m. ET trade deadline. The Cavaliers got a heavily protected second-round pick in the deal.

"We feel that Dwyane can help our team in so many ways," Heat president Pat Riley said in a statement. "It is a beautiful moment for us, for the city and for the fans. All of us embrace it in the manner that we want to win and that's why we brought Dwyane back home. We look forward to having a great end of season run as we fight for the playoffs."

Wade told The Associated Press that he intends to play for the Heat on Friday against the Milwaukee Bucks.

"I've missed them and I know they've missed me," he told the AP.

LeBron James endorsed the trade on Instagram on Thursday, saying he was happy for Wade.

Wade signed with the Cavs in September after working out a buyout with the Chicago Bulls. He spent last season with Chicago after 13 seasons and three championships with Miami.

Wade was averaging a career-low 11.2 points per game this season, coming off the bench in 43 of 46 contests.

The Cavaliers also traded Isaiah Thomas, Channing Frye, Derrick Rose, Jae Crowder and Iman Shumpert for Jordan Clarkson, Larry Nance Jr., George Hill and Rodney Hood in two other trades on Thursday.

A Cavs source told ESPN's Dave McMenamin that Cleveland wanted to "do right" by Wade once the acquisition of Clarkson, combined with the youth movement of Cedi Osman, made it clear Wade's role would be reduced. Wade, his representative Leon Rose and James were all consulted before the trade.

Wade, 36, is the Heat's all-time leader in several categories, including points (20,221), assists (3,933), steals (1,414) and games (855).

He has said he wanted to one day retire with Miami.