If the notice mentioned in section 35-22-22 is served upon the officer making the sale within the time therein provided, such officer forthwith shall pay the surplus into the district court of the county in which the sale was made. Any person claiming the surplus, or any part thereof, as provided in section 35-22-22, at any time before an order for distribution is made as prescribed in section 35-22-25, may file in the office of the clerk of the district court of the county where the sale took place a petition stating the nature and extent of that person's claim and praying for an order directing the payment to that person of the surplus money, or a part thereof.
N.D.C.C. § 35-22-23