In actions for the partition of real property or for the foreclosure of a mortgage or other lien, and in all actions affecting the title to real property, and in all other actions wherein an infant is a proper or necessary party and such infant resides out of this state, a guardian ad litem may be appointed upon application of the plaintiff. In such case, the court shall make its order designating some suitable person to be the guardian for the infant defendant for the purposes of the action unless the infant, or someone on the infant's behalf, shall procure the appointment of another guardian for such infant within such time after the service of the order as the court therein may fix. The order must contain special directions for the manner of its service, which may be upon the infant or upon any relative or other person with whom the infant resides, and may be either by mail or by personal service upon the person designated.
N.D.C.C. § 28-03-03