Fired HealthSouth Corp. CEO Richard Scrushy must repay more than $47 million in bonuses he received while running the medical rehabilitation chain amid a huge fraud despite being acquitted in the scheme, a judge ruled.

Combined with as much as $265 million in refunds the company is seeking from the federal government for taxes it paid on overstated income during the fraud, the court-ordered repayment could help shore up the finances of HealthSouth.

Scrushy plans to appeal.

"We believe the ruling is in error in that no state or federal court ... has ever made a finding on the basis cited in this case," Scrushy attorney Kile Turner said in a statement.

HealthSouth spokesman Andy Brimmer declined comment Wednesday.

The ruling by Jefferson County Circuit Judge Allwin E. Horn III came Tuesday in a shareholder lawsuit filed in 2002, when authorities were investigating allegations of insider trading by Scrushy, HealthSouth's main founder. While Scrushy was never charged with insider trading, the investigation exposed fraud at the company.

Federal jurors acquitted Scrushy on all criminal charges last year, but Horn said the ousted chief executive still must repay the company $47.8 million in bonuses and interest he earned while running HealthSouth from 1997 through 2002.

While the company initially reported profits during the period, Horn wrote, HealthSouth really lost money, making Scrushy and other executives ineligible for any bonuses. Whether Scrushy knew of the fraud didn't matter, the judge said.

"Scrushy was unjustly enriched by these payments to the detriment of HealthSouth and to allow Scrushy to retain the benefit of these payments would be unconscionable," Horn ruled.

Horn refused to make Scrushy repay another $10.4 million in bonuses for 1996, ruling that evidence showed the company did make money that year. Evidence in Scrushy's federal trial showed the fraud began in mid-1996.

Scrushy filed suit against HealthSouth last month seeking more than $100 million in compensation related to his firing in 2003, when the Securities and Exchange Commission filed suit against Scrushy and the company, revealing the fraud.

HealthSouth has filed a countersuit asking a judge to make Scrushy repay the company unspecified damages.

Fifteen former HealthSouth executives pleaded guilty in the fraud, including all five finance chiefs who worked under Scrushy. A 16th person was convicted in a federal trial.

Scrushy claims subordinates pulled off the scheme without his knowledge, but HealthSouth has filed court papers accusing him of directing the fraud to make it appear the company was meeting Wall Street earnings forecasts.

Scrushy is due to enter arbitration this month in a court-ordered attempt to settle the SEC suit. He has pleaded not guilty to criminal charges in a separate public bribery case in Montgomery.