The district attorney may appear and represent the county or the state in any manner [matter] arising before the courts of justices of the peace [magistrate courts] or committing magistrates when in his opinion the interests of the people demand his services.
NMS § 36-1-20