N.M. Stat. § 1-14-12
Disposition of deposit in impoundment proceedings.
If the petitioner shall successfully prosecute an election content [contest] or recount
proceeding that results in a change in his favor the court shall refund to him the deposit required
under Section 1-14-9 NMSA 1978 less any amount expended for guarding and preserving the
impounded ballots. In all other cases there shall be no refund. Any amounts not refunded shall
be transmitted to the state treasurer for credit to the state general fund.