The New Mexico state police shall cooperate with the respective sheriffs, constables, marshals, police and other peace officers of this state in the detection of crime and the apprehension of criminals throughout the state and shall, on the direction of the chief of the New Mexico state police, governor or attorney general, conduct such investigations as may be deemed necessary to obtain and secure evidence which may be considered necessary or essential for the conviction of alleged violators of the criminal laws of this state, and the chief is hereby authorized to assist any prosecuting attorney in the prosecution of any criminal case which may in his judgment require such cooperation. All expenses such as travel, meals and lodging involved in such assistance shall be paid from the court fund of the county in which the trial is held or to be held.
NMS § 29-3-2