Mandamus is an extraordinary legal writ, or process, issued by courts of superior jurisdiction, commanding tbe exercise of ministerial functions, and, when necessary, directing, controlling, and compelling the performance of sucb functions, when one who fills an official trust fails or refuses to perform sucb ministerial duty. In cases falling within tbis class, tbe court not only compels action, but directs in wbat manner it shall be performed. When, however, tbe powers of tbis process are invoked, to compel judicial action by inferior courts or magistrates, the rule is different. Sucb inferior courts or magistrates, -when they fail or refuse to do so, will be compelled to entertain and exercise jurisdiction. They will not be controlled in tbe manner of its exercise, nor directed as to wbat judgment they shall render. They will be commanded to render a judgment, but not a particular or specified judgment. So, ■ if judgment has been pronounced, no matter bow erroneous in law or fact, mandamus is not tbe appropriate remedy for correcting, vacating, or annulling such judgment. It has none of tbe powers or properties of a writ of error. — See Moses on Mandamus, pages 134 et seq.
In Ex parte Koon, 1 Denio, 644, it was said: “ It [mandamus] lies to correct many errors of ministerial officers, and even those of courts, when in tbe exercise of mere ministerial functions. But in no case does it lie to compel a jxxdicial tribunal to render any particular judgment, or to set aside a decision already made.” — See, also, Ex parte Burr, 9 Wheat. 529; State, ex rel. v. Bowen, 6 Ala. 511; Cuthbert v. Lewis, 6 Ala. 262; Ex parte Henry, 24 Ala. 638; Ex parte Elston, 25 Ala. 72; Ex parte Putnam, 20‘Ala. 592.
Tbe judgment rendered in tbis cause by tbe justice of tbe peace was prematurely rendered ; still it was a judgment, finally disposing of the cause in that court. If it bad been rendered in the Circuit Court, under similar circumstances, an appeal would have lain to tbis court, and sucb judgment would have been reversed. — Standifer v. Toney, 43 Ala. 70. If tbe jxxdgment rendered was substantially unjust, tbe defendant (petitioner in tbis cause) could have appealed to tbe Circuit Court, and there could have bad a trial de novo. Mandamus will be granted, only where there is a specific legal right, and no other specific legal remedy adequate to its enforcement. — 2 Brick. Dig. 240, §§ 4-5.
In any view we can take of tbis case, we bold that tbe Circuit Court did not err in refusing to award a mandamus.
Tbe judgment is affirmed.