Free agent Dwyane Wade has committed to joining the Chicago Bulls.

Wade has agreed to a two-year deal worth $47 million, according to the AP. The Miami Heat, Wade’s team for his entire 13-year career, had a two-year, $40 million offer on the table for him.

Extreme acrimony had been building between Wade and the Heat over the past week. Wade met with Heat owner Micky Arison in New York on Monday.

“Miami dared a very proud man to go home, and that man’s best friend [LeBron James] just won a title by going home,” a source very close to the process told ESPN’s Ramona Shelburne.

Arison took to Twitter late Wednesday to thank Wade for his 13 years with the Heat.

A source told ESPN’s Chris Broussard that Jimmy Butler had a phone conversation with Wade in which he recruited him. Wade and Butler, who are both Marquette products, are looking forward to playing together, according to the source.

Wade also considered Milwaukee because of the Marquette connection, the source told Broussard, but the Bucks couldn’t get near Wade’s asking price of 2 years, $50 million.