The Magic are close to resolving their coaching fiasco by agreeing to a deal to dismiss Billy Donovan and hire Stan Van Gundy, according to reports Tuesday.

ESPN.com reported Donovan and the team were finalizing an agreement for his departure. Terms would prevent Donovan from coaching in the NBA for five years. The Orlando Sentinel reported that the Magic offered a contract to Van Gundy, a former Heat coach and current adviser in Miami.

The Magic might have to compensate the Heat with money or a draft pick because Van Gundy is still under contract through June 30, 2008. Miami only has a first-round pick, No. 20 overall, in this year's draft, while Orlando currently has a first-rounder and three second-round selections.