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; and 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.
Ala. Code § 8-3-2 (1975)