Surety paying debt subrogated to rights of creditor.
A surety who has paid the debt of his principal is subrogated 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.