Chris Bosh re-signed with the Miami Heat on Friday, hours after LeBron James announced he would leave the Heat to play for the Cleveland Caveliers.

According to Yahoo Sports' Adrian Wojnarowski, Bosh took the Heat's max contract offer of $118 million over five years.

Bosh was choosing between staying in Miami or heading to the Houston Rockets, who reportedly offered him a four-year, $88 million contract. Houston traded star point guard Jeremy Lin to the Los Angeles Lakers to make salary room for Bosh.

Miami hopes to keep fellow superstar guard Dwyane Wade in Miami as well. Keeping Wade would allow the Heat to rebound quicker from James' departure. James led the team in points, rebounds and assists per game last season.

Bosh averaged 16.2 points, 6.6 rebounds and one block per game last season. He's won two NBA championships in Miami since joining in 2010.

All three of Miami's "Big Three" stars -- Wade, Bosh and James -- opted out early from their contracts at the end of the 2013-2014 season, fueling rumors that all three could leave South Beach. Bosh left $42 million on the table by opting out of his contract early.