The Alabama Supreme Court ruled against Birmingham-based HealthSouth Corp. on Friday in a legal dispute linked to the accounting fraud that rocked the rehabilitation company more than a decade ago.

The justices rejected an appeal filed by HealthSouth in a legal fight involving its one-time auditing company, Ernst & Young.

Shareholders filed a complaint on behalf of HealthSouth blaming Ernst & Young for failing to detect the $2.6 billion accounting scam that occurred under former CEO Richard Scrushy, who was acquitted of criminal charges in 2005. A civil court later held him responsible for the swindle.

An arbitration panel ruled against HealthSouth in a complaint aimed at making Ernst & Young share responsibility for the fraud, and HealthSouth appealed to Jefferson County Circuit Court. That court sided with the auditor, and HealthSouth appealed again.

The Supreme Court, in a decision written by Justice James Main, upheld the ruling against HealthSouth. The justices said there was no evidence the arbitration decision against HealthSouth was fundamentally unfair or that the panel engaged in any misconduct.

Evidence showed HealthSouth inflated its earnings by some $2.6 billion from the late 1990s through the early 2000s, when the scheme was uncovered. Fifteen HealthSouth employees pleaded guilty and jurors convicted one other.

Scrushy blamed everything on underlings but later served time in federal prison after being convicted in a bribery scheme involving former Gov. Don Siegelman, who remains in prison in Oakdale, La.

Scrushy, who maintains his innocence to all charges, now lives in Texas and sometimes lectures about corporate fraud.