
545 So.2d 802 (1989)
Ex parte CLEBURNE COUNTY BOARD OF EDUCATION, et al.
(Re Lynn PAYNE, et al. v. CLEBURNE COUNTY BOARD OF EDUCATION, et al.)
Civ. 6771.
Court of Civil Appeals of Alabama.
May 24, 1989.
*803 Joseph L. Boohaker, Birmingham, for appellants.
Don Siegelman, Atty. Gen., and B. Frank Loeb and Nancy I. Cottle, Asst. Counsel, Dept. of Revenue, and Asst. Attys. Gen., for appellees.
ROBERTSON, Judge.
This extraordinary writ (initially styled as a petition for writ of mandamus, or in the alternative an appeal) is filed as a result of a rule nisi hearing held May 19, 1988, and a subsequent order of contempt and award of attorney's fee by the Circuit Court of Cleburne County on July 25, 1988.
Initially this case was filed in the Circuit Court of Cleburne County in 1985, seeking both injunctive relief and a writ of mandamus. Members of Pleasant Grove Elementary School Board (Trustees), challenged the appointment by the Cleburne County Board of Education (Board) of Robert Chambless as principal of the school. The circuit court granted the writ of mandamus on January 6, 1986. The Board appealed from that order to the Supreme Court. The Supreme Court affirmed the trial court's order in September 1987. See Cleburne County Board of Education v. Payne, 518 So.2d 49 (Ala.1987). Rehearing was denied December 4, 1987.
The circuit court's original writ of mandamus of January 6, 1986, ordered the Board to remove Chambless from the position of principal of Pleasant Grove Elementary School, to appoint and assign another principal to the position, and to thenceforth comply with § 16-10-4, Ala.Code 1975, in the appointment/assignment of said principal.
Upon notification of the supreme court's affirmance, the superintendent, by way of letter dated December 9, 1987, removed Chambless as principal. By letter dated the same day, the superintendent assigned Don Chandler, the assistant principal, to the position of acting principal of the school until further notice. The second sentence of the letter stated, "You are to assume all duties of the principalship until this vacancy has been addressed by the Board of Education." (Emphasis added).
On December 22, 1987, the Trustees filed a petition in the Circuit Court of Cleburne County, asking the court to find the Board in contempt for failure to comply with its order of January 1986, and also petitioned the court for an award of attorney's fee.
A rule nisi hearing was held May 19, 1988, and by order dated July 25, 1988, the court found the Board to be in contempt of court for failure to appoint a principal as previously ordered. The trial court was advised, after the rule nisi hearing, and before the trial court's order, that the Board had appointed Mr. Chandler as principal, and that the appointment was agreed to and accepted by the Trustees. The court found that the Board had purged itself of contempt, approved the appointment of Mr. Chandler as principal, and ordered an attorney's fee in the amount of $4000. This request for appellate review followed.
*804 The Board raises several issues regarding the contempt citation and the award of attorney's fee. However, before reviewing, we must first address the appropriateness of a petition for writ of mandamus, or alternatively, an appeal, as the proper method to review a trial court's judgment of contempt. If the contemner is not incarcerated, the proper method is by writ of certiorari. If the contemner is incarcerated, the proper method of review is by writ of habeas corpus. Ex parte Baugh, 530 So.2d 238, 241 (Ala.1988). However, this court treated an appeal of a contempt citation as a petition for writ of certiorari where a husband was ordered to pay back alimony and his ex-wife's attorney's fee. Roe v. Roe, 487 So.2d 1372 (Ala.Civ.App.1986); therefore, we shall treat the Board's appeal as a petition for a writ of certiorari.
The basic purpose of contempt proceedings is to secure prompt compliance to court orders and judgments. Jim Walter Resources, Inc. v. International Union, UMWA, 609 F.2d 165 (5th Cir.1980). The record supports the trial court's judgment of contempt as to the rule nisi proceeding. All courts have inherent authority to punish for contempt in the interest of protecting their dignity and demanding obedience to their decree. Klingler v. White, 465 So.2d 405 (Ala.Civ.App.1984). That leaves the matter of attorney's fee, which is what this petition is all about.
The trial court had reserved the attorney's fee issue throughout the writ of mandamus proceedings and addressed it after being advised that its order had finally been obeyed. In pertinent part, the order dated July 25, 1988, stated, "Plaintiffs are hereby awarded the sum of $4000 as reasonable attorney's fee pursuant to the Plaintiffs' initial complaint and subsequent motion for contempt...." It is clear from the order that part of the $4000 attorney's fee was allocated to the writ of mandamus complaint, and another part was allocated to the motion for contempt.
Attorney fees are not recoverable in writs of mandamus proceedings. See Shelby County Commission v. Smith, 372 So.2d 1092 (Ala.1979). Therefore, that part of the $4000 attorney's fee allocated to the "initial complaint" is due to be deducted from the award.
However, our supreme court in Moody v. State ex rel. Payne, 355 So.2d 1116 (Ala. 1978), held that attorneys' fees are recoverable in civil contempt proceedings. They are not mandatory, but may be awarded in the sound discretion of the trial court. The writ is denied as to that part of the attorney's fee allocated to the civil contempt proceeding.
The writ is hereby granted for a determination of attorney's fee in the "motion for contempt" and for further proceedings consistent with this opinion.
All other issues are pretermitted.
WRIT GRANTED.
INGRAM, P.J., and RUSSELL, J., concur.
