When the principal and surety, or endorser, are sued, and the execution is stayed without the request or consent of the surety or endorser, the stayor shall be liable, in default of the principal debtor, to pay the debt and costs of judgment and in priority to the first surety or endorser, unless the first surety or endorser specially and in writing joined with the debtor in procuring the stay.