
101 So.2d 259 (1958)
CITY OF BIRMINGHAM
v.
James B. TRAMMELL et al.
6 Div. 208.
Supreme Court of Alabama.
March 6, 1958.
*260 Jas. G. Adams, III, Birmingham, for appellant.
Taylor, Higgins, Windham & Perdue and London & Yancey, Birmingham, for appellees.
PER CURIAM.
This is an appeal by the City of Birmingham from a final judgment at law in the Circuit Court of Jefferson County denying the application of the city to intervene in a suit for damages for personal injuries by Trammell against Haynes. Section 247, Title 7, Code.
Trammell was a police officer of the city, and the complaint alleges that Haynes negligently caused Trammell to be injured and as a proximate consequence the city was caused to lose the services of Trammell for, to wit, fifty-one days. That under the Civil Service Act of the Legislature, Code 1940, Tit. 12, §§ 133 to 159, the city was directed by the Personnel Board of Jefferson. County *261 to pay Trammell the amount of his salary while disabled to render such services. That amount was $671.50, being in full for the fifty-one days.
The petition for intervention alleges that on account of the city's payment of such salary to Trammell while disabled, he cannot recover it in this suit against Haynes, but that the city in paying it became subrogated to the rights of Trammell and may recover it. The petition also alleges that plaintiff Trammell "orally or impliedly agreed that intervenor should be subrogated to plaintiff's rights or cause of action against defendant to the extent that intervenor paid plaintiff's salary during said fifty-one days plaintiff was off duty." The petition also alleges that intervenor "entered into an agreement with said plaintiff whereby intervenor paid plaintiff's surgical and hospital expenses and became subrogated to plaintiff's rights against defendant to the extent of such payment, to wit, $429.43." It further alleges that "plaintiff orally or impliedly or orally and impliedly agreed to pay intervenor the amount it would pay out in medical, surgical and hospital expenses out of any settlement or recovery he might receive from defendant or any third party if intervenor would pay such expenses." It then alleges the payment of $429.43 on that account.
There was no answer or demurrer to the petition. On the hearing the court ordered and adjudged that the petition be denied. There is no indication in the record of proof taken on the hearing. There should regularly be an answer or a demurrer filed to the petition,Section 247, Title 7, Code; but formal rules of pleading are not required. Johnson v. Johnson, 252 Ala. 366(4), 41 So.2d 287.
The petition to intervene will not be granted unless it shows a right which the court will recognize and enforce. If it shows the existence of a right to subrogation it shows a right to intervene. But the facts alleged must show a right to subrogation.
Subrogation is either legal or conventional. As here applicable, legal subrogation arises by operation of law where a surety having a legal liability to do so pays a claim primarily owing by his principal. (2) Conventional subrogation depends upon a lawful contract. Gautney v. Gautney, 253 Ala. 584, 46 So.2d 198; Ragland v. Board of Missions, 224 Ala. 325, 140 So. 435; Shaddix v. National Surety Co., 221 Ala. 268, 128 So. 220.
Subrogation is equitable in nature, but by sections 78 and 87, Title 9, Code, it is available at law. Holder v. Brooks, 261 Ala. 127, 73 So.2d 355. Section 247, supra, provides the machinery for enforcing the right at law. That machinery was pursued in this case. Sections 78 and 87, supra, were inserted in the Code of 1907 by the code commissioner and adopted as a feature of the Code of 1907. They were brought forward into the Codes of 1923 and 1940 without change. They are particularly here in point, and are as follows:
(78) "A surety who has paid his principal's debt is entitled to a transfer of the original and collateral security which the creditor holds; he has all the rights to realize thereon and to reimburse himself to the same extent as the creditor might have done before the surety paid him, whether paid before or after judgment or decree. He shall be substituted for the creditor and subrogated to all his rights and remedies; in effect, he shall be a purchaser of the debt and all its incidents."
(87) "A surety who has paid the debt of his principal is subrogated both at law and in equity, to all the rights of the creditor, and in a controversy with other creditors, ranks in dignity the same as the creditor whose claim is paid." See, Holder v. Brooks, supra.
This being a suit at law in which the right of subrogation is sought, it is controlled by sections 78 and 87 above.
It is not controverted that the city became obligated to pay Trammell his salary *262 as a police officer as well as surgical and medical needs while he was disabled. That is by virtue of Rule 11.7 promulgated by the Personnel Board under the Civil Service Law applicable to Birmingham. That rule is as follows:
"An employee who is injured while performing the duties of his position, without fault or negligence on his part, shall be allowed such leave with pay as the Board deems proper. Every application for such allowance shall contain a statement by the employee affirmed by his supervisor setting forth the details of the accident and supported by the certificate of a licensed physician setting forth the nature and extent of the injury and the probable period of disability. Every leave granted under the provisions of this rule shall be recorded in the Minutes of the Board and shall be entered in the roster as `Injured with Pay.'"
Sections 78 and 87, supra, confer on a court of law the equitable right of subrogation. They are clear and specific that it is only available to a surety who has paid his principal's debt, and thereby becomes substituted for the creditor and subrogated to all his rights and remedies. We have many cases on the subject in this State, some in equity and some at law. We have held that to obtain the benefit of subrogation, one "need not be in the attitude of a conventional surety, but if he is so by virtue of some equitable principle such feature of the requirement is met." Hall v. Hall, 241 Ala. 397(12), 2 So.2d 908, 914; Murphy v. May, 242 Ala. 247, 5 So.2d 769; Bradley v. Bentley, 231 Ala. 28(6), 163 So. 351.
We think the term "surety" as contained in those statutes means that the person in question is not liable as surety unless another is primarily liable (72 C.J.S. Principal and Surety § 2, p. 515), or unless the property of the former may be subjected to the claim without a personal liability by the owner. To be so the proposed surety should not be liable at all unless his proposed principal is primarily liable. A surety is one who contracts to answer for the debt, default or miscarriage of another (Mobile and Ohio R. Co. v. Nicholas, 98 Ala. 92 [6], at page 126, 12 So. 723, at page 735); and not one who pays or agrees to pay his own debt.
The statute does not apply to one who is liable to discharge a claim whether or not the proposed principal is liable. There can be no surety unless there is a principal primarily liable. There may be a separate and distinct obligation to Trammell on the part of each of the parties, City of Birmingham and defendant Haynes. The city has recognized its liability to Trammell and has paid it.
We are not concerned with the question of whether that payment prevents Trammell from recovering on that same claim against Haynes, nor whether such a recovery by Trammell would be for the benefit of the city. The question is whether the city having paid Trammell because the law created an obligation to do so, has a claim against Haynes for wrongfully causing Trammell to sustain the damage for which the city has paid him. The city owed that obligation to Trammell, although Haynes may not have caused the liability or may have been innocent in causing it. The city is not in a true sense a surety for Haynes and has no right of subrogation.
There being no evidence, so far as the record shows, offered on the trial of the petition to intervene to prove that feature of the petition which alleges there was an oral or implied agreement that the city should be subrogated, we cannot review the ruling of the trial court in respect to that aspect of the petition. In order to support such ruling, we will assume that the evidence did not support those allegations of the petition. Their sufficiency has not been tested.
This case was considered in connection with City of Birmingham v. Jones, Ala., 101 So.2d 263; City of Birmingham v. *263 Crow, Ala., 101 So.2d 264; City of Birmingham v. Walker, Ala., 101 So.2d 250, and City of Birmingham v. Tate, Ala., 101 So.2d 263.
It follows, therefore, that the judgment of the trial court should be affirmed.
The foregoing opinion was prepared by FOSTER, Supernumerary Justice of this Court, while serving on it at the request of the Chief Justice under authority of Title 13, section 32, Code, and was adopted by the Court as its opinion.
Affirmed.
LIVINGSTON, C. J., and LAWSON, SIMPSON, GOODWYN, MERRILL and COLEMAN, JJ., concur.
