Appointment of a guardian ad litem may be made by the court in which the suit is pending, or by the judge thereof in vacation, upon the written request of the infant defendant, if the age of fourteen years or more, or, if said infant is under the age of fourteen, on the written request of a relative or friend of the infant, or on the written consent of any competent person proposed as guardian ad litem, and such request and consent shall be filed in the office of the clerk of the court before any answers by such infant shall be filed.
NMS § 38-4-10