Section 141 of the Contract Act, 1872 incorporates the surety's right of subrogation. It provides that when a surety pays the debt, they step into the creditor's shoes and can exercise all remedies available to the creditor against the principal debtor, including the right to sue.