Dwyane Wade will stay with the Miami Heat, thanks to an agreement the team has reportedly reached with Chris Bosh.

ESPN and The Associated Press are reporting that Wade, who was willing to stay with the Heat on the condition that Bosh or No. 1 free-agent pick LeBron James were added to the team, has decided to sign a new contract.

It is unclear whether Miami’s acquisition of Bosh will come through a simple free-agent signing or a sign-and-trade deal with the Toronto Raptors, according to The Associated Press.

Bosh and Wade are friends. They were also Olympic teammates on the gold-medal team in Beijing, and they dined together during the free-agent interview process last week in Chicago, according to the AP.

All eyes are now on the No. 1 pick among free agents: LeBron James. The two-time MVP plans to say which team he’ll play for next on ESPN Thursday night.

Wade, Bosh and James have talked about playing together, and now the only way that could happen is in Miami.

Pictured above are Dwyane Wade, left, and Chris Bosh, right.