Hereafter in any suit or action pending in any of the courts of this state, involving the right to the possession or title of any lode or placer mining claim located under the mining laws, and upon which it is necessary to do the annual assessment work to prevent the same from becoming forfeited and subject to relocation, the party or parties to any such suit out of possession, upon petition to the court in which suit or action is pending, showing that such annual assessment work has not been done on or before the first day of November in the year during which such work is required to be done, shall be entitled to an order as of course in such suit or action, permitting such party or parties to enter in and upon such mine or mining claims, with their agents and laborers, and to do and perform such annual assessment work to prevent the said mining claim or claims from becoming subject to relocation: provided, that in the doing of such work, no ore shall be removed from the boundaries of such mining claim.
NMS § 42-4-24