This is an action by the petitioner against the respondents for a writ of habeas corpus to obtain the custody of Donald Hanson and Keith Paul Hanson, minor sons of the petitioner and her former husband Donald E. Hanson. We deem a summary of the pleadings unnecessary. The contentions of the respective parties become manifest by the evidence shown by the record and as appears in the opinion.
The record discloses that Donald E. Hanson and Ardeth J. Hanson were married April 15, 1943,.at Chester, Nebraska, and that at that time he was serving in the United *339States Navy. After the marriage the couple went to live in Long Beach, California. On May 8, 1944, Donald Hanson was born, and on August 15, 1945, Keith Paul Hanson was born. Both were born in California. Donald E. Hanson, the husband and father, was discharged from the military service in November 1945. The family were living in California at the time. Subsequent to his discharge from the service Donald E. Hanson worked for a while in a restaurant in San Diego, California. The family lived together from October 1945, until December 4, 1946, when they separated. Donald E. Hanson, on that date, returned to Nebraska with his mother, Irene Hanson, who had been visiting him and his family since November 28, 1946. Ardeth Hanson and the children remained in California.
There appears in the record a separation agreement entered into December 3, 1946, between the parties, wherein they agreed each to reside at the place or places and with such relatives, friends, or other persons as they from time to time thought fit, without restraint, provided only that the home supplied by the wife should be a fit and proper home for the minor children; that the wife should have custody of the minor children and the husband pay $50 per month for their support. Since the date of the agreement, Donald E. Hanson has contributed $137.50 toward the support of the children.
After Donald E. Hanson left, the petitioner, in the latter part of December 1946, procured employment doing fountain and cashier work in a drive-in in San Diego, California, at a salary of $36 per week. She remained in this employment until July 4, 1947, when she accepted employment as a car hop at the same establishment on an agreed salary and tips which enabled her to make $75 or more per week. She remained in this work until she returned to Nebraska on April 23, 1948.
Exhibit 1 is- a letter dated March 27, 1947, written to the petitioner by her husband apparently in reply to a letter of hers of March 10th and a wire of March 26th. *340This letter calls attention to the husband’s visit to California to see the petitioner and their children on March 3d. At that time he endeavored to persuade his family to return with him to Nebraska where he claimed he had iiis home and where he was employed and could support them. In this connection he called the petitioner’s attention to an oral agreement that she made on March 3d, to the effect that she would permit the children to return to Nebraska and visit him and the grandparents. He also informed her that due to her failure to keep her word in such respect, and her unwillingness to return to Nebraska but to remain in her employment, he declared the agreement made between the parties in December 1946, no longer effective. He further wrote to the effect that his earning capacity was nil at that time due to an accident, and he could not send her any money.
When he returned to Nebraska in December 1946, he lived with his parents and engaged in the dairy business with his father. Connected with this business was a port-of-entry position held by the father.
On May 17, 1947, Donald E. Hanson instituted suit for divorce in the district court for Thayer County, charging in the petition that the defendant, Ardeth Hanson, was guilty of extreme cruelty. On May 25, 1947, Ardeth was served with a summons in San Diego, California. Shortly after the summons was served on her she wrote a letter to her husband, which is undated, to the effect that he should “come out and get the kids” and bring his mother to help take care of them. She also wrote some admonitions in the letter about his conduct toward the children, and stated she was not going to fight the case because she needed her job and was not making enough money to take care of them, and that her mother was leaving. She further wrote: “Maybe if you have the kids you folks will make you take care of them * *
The petitioner did not appear in the divorce action, and she was in default June 24, 1947. The. default divorce decree was entered on March 15, 1948. At that time *341the younger child, Keith Paul Hanson, was living with his mother in California. Petitioner testified that she had a conversation with her husband over the telephone on July 7, 1947, wherein she called his attention to the separation agreement providing for support money. His reply was that he did not have any money, but would send some when he got it. He further stated that if she would send the baby to Nebraska to visit his grandparents, he would send him back after the summer vacation, which would help her out until she got on her feet. The petitioner’s reason for calling her husband was that she was unable at that time to take care of both of the children. On July 9, 1947, she sent the older boy to Nebraska with his uncle to visit his grandparents, in accordance with the telephone conversation.
In October 1947, Donald E. Hanson' enlisted in the United States Army for a period of three years, and at the time of this hearing, was stationed at Spokane, Washington.
• On April 3, 1948, Ardeth’s mother had an opportunity to visit friends and relatives in Belleville, Kansas, a short distance from the home of respondents in Chester, Nebraska. Ardeth permitted the younger son, Keith Paul Hanson, to accompany her mother, and instructed her mother not to let the child go into Nebraska. On or about April 16,1948, Ardeth’s mother brought Keith Paul Hanson to visit his grandparents. She returned to get him the next night when both of the children were in bed, and took him without getting his clothes. His grandmother, Irene Hanson, testified she just did not get the child’s clothes.
The record discloses a controversy with reference to the custody of Keith Paul Hanson by certain welfare agencies intervening in the interests of the child at Ogden, Utah, and Hebron, Nebraska, for the reason that when Ardeth’s mother arrived at Ogden the child was ill and was without adequate clothing. There, is some intimation in Ardeth’s testimony that when she heard about *342the child on or about April 19, 1948, from the Traveler’s Aid, if she would permit the child to return to Nebraska, her mother would be released. Ardeth informed the inquirer that she was returning to Nebraska in the interests of her children. The record does not disclose that there was any threat by any proper authority to prosecute Ardeth’s mother. The telegrams in the record are of an inquiring nature, and nothing more.
On cross-examination Ardeth testified that she held the job of car hop, and worked from six at night until two in the morning, and resided approximately six blocks from her work; that her mother lived with her and could take care of the children during Ardeth’s working hours.
Pictures are in evidence which the respondents introduced apparently to show that Ardeth was indiscriminate or was in a compromising position with men other than her husband. It appears that she worked in a photograph gallery on what is known as the “Pike” where there is a carnival, while she and her husband were in California, to earn some money for the support of their minor children until the- allotment checks by the government were received. There is nothing in the pictures that discloses any improper conduct on her part.
The testimony ■ of the witnesses for the respondents is for the most part with reference to their fitness to have the care and custody of the minor children. The type of home, the reputation, the financial circumstances, and religious character of the respondents are favorable and not particularly denied.
The trial court adjudged that the application of the petitioner for a writ of habeas corpus be dismissed and that the custody of the minor children be left with respondents. Upon the overruling of the motion for new trial, the petitioner perfected her appeal to this court.
The petitioner will hereinafter be referred to as the appellant, and the respondents as the appellees.
The appellant contends the trial court erred in awarding the custody of the minor children to the appellees *343for the reason that the judgment is contrary to the law and the evidence.
Section 42-305, R. S. 1943, provides for constructive service in divorce actions. It is in part and in substance as follows: No person shall be entitled to a divorce unless the defendant shall have been served with personal notice duly approved and appearing of record, if out of this state, or unless the defendant shall have entered an appearance in the case.
The appellant was served with personal notice at her home in San Diego, California. She entered no appearance in the divorce action.
Section 38-107, R. .S. 1943, provides in part: “The father and mother are the natural guardians of their minor children and are equally entitled to their custody, * * * being themselves competent to transact their own business and not otherwise unsuitable.”
Parents have a natural right to the custody of their children unless they are affirmatively shown to be unfit. See Voboril v. Voboril, 115 Neb. 615, 214 N. W. 254.
“In general, the writ of habeas corpus has been extended to, and may be used in, controversies regarding the custody of infants. Such proceedings are governed by considerations of expediency and equity, and shóuld not be bound by technical rules of practice.” 39 C. J. S., Habeas Corpus, § 41, p. 568.
“After the court’s jurisdiction has been invoked by habeas corpus petition seeking custody of a child, the child is a ward of the court and its welfare lies in the hands of the court; * * 39 C. J. S., Habeas Corpus, § 41, p. 570. See; also, 25 Am. Jur., Habeas Corpus, § 80, p. 204; Kaufmann v. Kaufmann, 140 Neb. 299, 299 N. W. 617. In re Application of Schwartzkopf, 149 Neb. 460, 31 N. W. 2d 294; Brandon v. Brandon, 154 Ga. 661, 115 S. E. 115; Kline v. Kline, 57 Iowa 386, 10 N. W. 825; Sanders v. Sanders, 223 Mo. App. 834, 14 S. W. 2d 458; Rodgers v. Rodgers, 56 Kan. 483, 43 P. 779.
■ The foregoing authorities are clearly indicative that *344habeas corpus is the proper remedy to try the issues of the custody and welfare of minor children in a case such as the one at bar.
“Domicile” may have a variety of significations depending on' various applications. An exact and comprehensive definition is hard to formulate. It manifests the legal conception of home, and is synonymous with home. See 28 C. J. S., Domicile, § 1, p. 2. See, also, Brandon v. Brandon, supra.
“In a strict legal sense that place is properly the domicil of a person where he has his true, fixed, permanent home and principal establishment, and to which place he has, whenever he is absent, the intention of returning, and from which he has no present intention of moving.” 17 Am. Jur., Domicil, § 2, p. 588.
It is true that while Donald E. Hanson was in the military services his domicile and residence may have been considered where he formerly lived. It is apparent that after his discharge from the military service he and his wife lived in California. He obtained employment there, apparently with the inténtion to remain at the time, and was so employed for a year before leaving . for Nebraska to make his home. His wife remained in California with the children and her job after the separation, and the agreement of separation in evidence provides that she may choose her residence. She has done so, with the intention to make her home in the state of • California.
“It is settled that the domicil of an unemancipated legitimate infant is the same as that of the father, and will' be deemed to have continued the same until it is shown to have been legally changed in circumstances warranting the change.” Annotation, 49 L. R. A. N. S. 860, and cases cited thereunder.
If the interest of the child is to be considered in cases of legal separation, when hostility between the father and mother exists, where the latter is endowed with the legal custody of the child, there is no wisdom or justice *345to support the rule that the legal residence of the mother and- child does not establish the domicile of the latter. See Fox v. Hicks, 81 Minn. 197, 83 N. W. 538, 50 L. R. A. 663; also, Annotation, 49 L. R. A. N. S. 565.
It is apparent in the instant case the husband and wife each had separate domiciles.
Appellant contends that a default decree of divorce rendered upon constructive service, the defendant making no appearance in the case and defendant and her children being domiciled in another state, is void under the fourteenth amendment to the Constitution of the United States insofar as the custody of the minor children is concerned.
In the case of Kline v. Kline, supra, it is said in effect that a decree in a divorce proceeding in regard to the custody of minor children, nonresidents of the state in which such decree is made, is, so far as it relates to the custody of such children, without jurisdiction and cannot be enforced. Where, in a divorce proceeding, the court has no jurisdiction of defendant, except as acquired by publication, it has jurisdiction only to declare the status of the parties before it, and grant the divorce, and the decree in excess of this is without jurisdiction. It was argued that the father was entitled to the custody of the children by virtue of the Wisconsin decree. The general rule, as claimed by counsel for appellant, that the domicile of the wife and children is the domicile of the husband and father, is no doubt correct. From this it is argued that the circuit court in Wisconsin had complete jurisdiction of all the parties, and that the decree awarding the custody of the children to the father is entitled to full faith and credit in this state. But the rule contended for is subject to the exception, that in proceedings for divorce in most, if not all, the states, the law recognizes the husband and wife as having separate domiciles, and a valid divorce may be decreed in the state where only one of the parties resides. A suit for divorce, in its nature, makes the husband and wife opposite and con*346tending parties, .and the legal fiction of .a unity of person and of domicile, by reason of . the marriage, is destroyed by the law which authorizes the action. Such was the fact in this case. The husband'procured his decree on service, by publication, after the wife and two children, had been nonresidents of this state for more than two years.
In Weber v. Redding, 200 Ind. 448, 163 N. E. 269, it is said: “* * * the weight of authority is in favor of confining the jurisdiction of the court in an action for divorce, where the defendant is a non-resident and does not appear, and process upon the: defendant is by substituted service only, to a determination of the status of the parties.” See, also, Rigney v. Rigney, 127 N. Y. 408, 28 N. E. 405, 24 Am. S. R. 462; Thrift v. Thrift, 54 Mont. 463, 171 P. 272; Silver Camp Mining Co. v. Dickert, 31 Mont. 488, 78 P. 967, 3 Ann. Cas. 1000, 67 L. R. A. 940; De la Montanya v. De la Montanya, 112 Cal. 101, 44 P. 345, 53 Am. S. R. 165, 32 L. R. A. 82; 2 Cooley’s Constitutional Limitations (8th ed.) 857. This rule of law extends to children who are not within the jurisdiction of the court when the decree is rendered, where the defendant is not a resident of the state of the seat of the court, and has neither been personally served with process nor appeared to the action. See Kline v. Kline, supra; Harris v. Harris, 115 N. C. 587, 20 S. E. 187, 44 Am. S. R. 471; Steele v. Steele, 152 Miss. 365, 118 So. 721; 2 Cooley’s Constitutional Limitations (8th ed.) 857; 1 Wharton on Conflict of Laws (3d ed.) § 239f, p. 530.
Does the fact that the older child was temporarily visiting in this state when the decree of divorce was rendered give the district court of this state jurisdiction to determine its custody? ■ .
“Since custody of a child by one parent carries with it domicil and a domestic status, jurisdiction to give the child to one parent or the other depends in principle on the domicil of the child; and a state which is the temporary residence of the child, not the domicil, cannot confer *347the right to custody.” • 2 Beale, The Conflict 'of Laws, Status, § 144.3, p. 717.
In Lanning v. Gregory, 100 Tex. 310, 99 S. W. 542, the court said: “The child being in the lawful custody of the father, and its domicile with him in Louisiana, a District Court of Texas did not acquire jurisdiction of the child, by reason-of its temporary presence in Texas, and had no authority to adjudge a change of relation between the father- and the child.”
In Motichka v. Rollands, 144 Wash. 565, 258 P. 333, it is said: “Full faith and credit must be accorded by the courts of this state to a decree of divorce of a sister state awarding the custody of an infant child to one of the parties, where the child was domiciled in such state and never acquired a residence in this state, simply temporarily sojourning here, where she was sent to spend a part of her school vacation in the custody of her other parent, in compliance with the terms of the decree of divorce.” See, also, People v. Dewey, 50 N. Y. S. 1013, 23 Misc. 267. The court said it was apparent that the child was not sent to the respondent in another state with a view of becoming a resident of or becoming domiciled in such state. This is true in the instant case with reference to the custody of Donald Hanson.
In Callahan v. Callahan, 296 Ky. 444, 177 S. W. 2d 565, the child was living with her mother at the time of the rendition of a judgment in another state. Her domicile was with her mother, and the judgment awarding the custody of such child to the father had no effect. The court said: “Even if -it be assumed that a showing was made at the time of the rendition of the Indiana judgment warranting-the placing of the infant in the custody of the father * * *, the record now before us shows conclusively - that -the mother should have the custody of the child. No question whatever is raised as to her character-or fitiiess in this respect, * *
In view of the afore-cited authorities, the fact that Donald Hanson was temporarily within the state at the *348time the divorce decree was rendered creates no barrier against a proceeding in habeas corpus on the part of the mother to have the child’s custody determined.
In a habeas corpus action touching the custody of children the case stood before the district court as if there had been no former decree and the matter was before him to determine as to what would be for the best interests and welfare of the children. See authorities heretofore cited, also, Steele v. Steele, supra; Haynie v. Hudgins, 122 Miss. 838, 85 So. 99.
The appellees cite Baldwin v. Burt, 54 Neb. 287, 74 N. W. 594, a foreclosure action, to the effect that once a decree is entered in a matter it may be attacked for want of jurisdiction, but such attack can only be directed against the decree and not against the evidence upon which it depended for its validity. The appellees contend that certain allegations in the petition for divorce indicating improper and immoral conduct on the appellant’s part constitute evidence in the divorce action, and the court in its decree found the allegations of the petition to be true. There is a distinction between actions such as in Baldwin v. Burt, supra, and cases involving divorce and the custody of minor children. In the latter cases the state is a party, in that its interest adheres to any action concerning care and custody of infants when made the subject of judicial inquiry.
“ ‘Every child born in the United States has, from the time it comes into existence, a birthright of citizenship which vests it with rights and privileges, entitling it to governmental protection, “and such government is obligated by its duty of protection, to consult the welfare, comfort, and interests of such child in regulating its custody during the period of its minority.” Mercein v. People, 25 Wend. (N. Y.) 64, 35 Am. Dec. 653.’ In re Gould, 174 Mich. 663, 679.” State ex rel. Bize v. Young, 121 Neb. 619, 237 N. W. 677. See, also, Weber v. Redding, supra.
In Cummins v. Cummins, 47 Neb. 872, 66 N. W. 858, *349this court said: “It has been said that the state is a third party to all divorce cases. It is not true that a petition stands confessed because not answered; * *
Baldwin v. Burt, supra, has no applicability to the instant case.
The appellees rely on a letter written by the appellant which heretofore appears in the opinion. We are not unmindful that the letter referred to indicates an intention, at the time it was written, of surrendering the children to the father to be under the care of the grandparents. The motive for writing it is clear. The mother at that time needed financial help which was not forthcoming from her husband. She felt that he and the children’s grandparents could take them and help her get on her feet. It was obviously written in a moment of stress and discouragement.
Parentage in its full import is not to be so lightly surrendered. The right to custody of children implies a correlative duty of the highest obligation. It cannot be divested or forfeited beyond recall by a letter written in a moment of caprice or discouragement. See Norval v. Zinsmaster, 57 Neb. 158, 77 N. W. 373.
In Terry v. Johnson, 73 Neb. 653, 103 N. W. 319, this court held: “The right of a parent to the custody of a minor child of tender years is not lightly to be set aside, and it should not be done where unfitness is not affirmatively shown or a forfeiture of such right clearly established.” In the cited case the evidence disclosed that the grandparents were highly respected people, had a good home, and were in easy financial circumstances. There was no affirmative evidence showing that the father, who desired to obtain the custody of one of the children, was an unfit or improper person. It was said: “This, then, presents the question as one of law as to which has the superior right to the custody of a child of tender years, the father of the child or its grandparents, when each is shown to be a proper party for the exercise of such a duty. It is urged by counsel for *350respondents that only the best interest of the child should be considered, and that the question of the natural right of the parent should be regarded as only of secondary importance. * * * ‘The father and mother are the natural guardians of their minor children, and are equally entitled to their custody, * * ” See what is now section 38-107, R. S. 1943.
In Norval v. Zinsmaster, supra, it is said: “The court has never deprived a parent of the custody of a child merely because on financial or other grounds a stranger might better provide. The statute declares ánd nature demands that the right shall he in the parent, unless the parent be affirmatively unfit. The statute does not make the judges the guardians of all the children in the state, with power to take them from their parents, so long as the latter discharge their duties to the best of their ability, and give them to strangers because such strangers may be better able to provide what is already well provided.” See, also, In re Application of Schwartzkopf, supra.
An analysis of the record, in the instant case shows the children involved to be of approximately five and three years of age. The evidence does not show that the appellant was an unfit, unworthy, or improper mother to have the care and custody of the children. The law is well established that children of tender years should be placed in the custody of their mother where she is not shown to be unfit or unworthy to have such custody. See cases heretofore cited, also, Boxa v. Boxa, 92 Neb. 78, 137 N. W. 986; Swolec v. Swolec, 122 Neb. 837, 241 N. W. 771; Gillett v. Bryant, 203 Ill. App. 322.
For the reasons given in this opinion, we reverse the judgment of the district court and remand the cause with directions to enter judgment in favor of the appellant awarding her the custody and control of the two minor children constituting the subject matter of this action.
Reversed and remanded with directions.
Simmons, C. J., participating on briefs.