
91 Cal.App.2d 336 (1949)
ELIZABETH YELDELL STRONG, Respondent,
v.
STACEY ELLIOTT OWENS et al., Appellants.
Civ. No. 16796. 
California Court of Appeals. Second Dist., Div. Two.  
Apr. 19, 1949.
 Simon, Fox & Fraider, Stanley E. Fox and A. David Kagon for Appellants.
 E. Marshall Bitgood for Respondent.
 WILSON, J.
 From a judgment granting plaintiff the exclusive custody and control of her minor child, defendants appeal.
 Plaintiff is the natural mother of the infant in question *338 who was born July 13, 1945, and for whose custody she has petitioned. The child is the issue of a clandestine love affair between plaintiff and defendant Stacey Elliott Owens. At the time of his birth and at the time of trial plaintiff was married to Henry Strong, Jr., and defendant Owens, the acknowledged father of the child, was married to defendant Fay Owens. Plaintiff's husband is a sergeant in the United States Army, stationed outside California. When the child was born, neither the spouse of plaintiff nor of Owens had knowledge of it. Defendant Fay Owens first learned about the situation when plaintiff called her on the telephone about seven months later.
 At the time plaintiff and the child were discharged from the hospital, plaintiff went to the home of a friend and the infant was immediately placed, with the aid of the Children's Bureau of the city of Los Angeles, in the home of a Mrs. Johnson in Monrovia. During the first year of his life the child was transferred to two other homes and in August, 1946, with the consent of plaintiff, he was taken by defendants into their home. About seven months later plaintiff asked Owens for custody of the child, which he refused and she thereupon brought this action on May 12, 1947. On August 5, 1947, plaintiff filed a petition for a writ of habeas corpus, praying that the child be delivered to her. The matter was heard on August 8, 1947, and the writ was denied.
 Defendants contend that (1) the denial of the petition for a writ of habeas corpus was an adjudication upon the question of the right to custody and is res judicata as to this proceeding; (2) it was error for the trial court to permit the introduction into evidence of a "certificate" in the form of a letter from plaintiff's husband for the purpose of proving her allegation that her husband desired to receive the child into his home and to assume responsibility for his support, and (3) it was an abuse of discretion for the court to award exclusive care and custody of the child to plaintiff without restricting her right to remove him from the jurisdiction of the court and without providing safeguards whereby she would be required to cooperate in making reasonable arrangements for Owens to visit the child and to keep him advised as to the child's whereabouts.
 [1] Defendants' contention that the habeas corpus proceeding is res judicata of the issues in the instant proceeding is untenable. The record discloses the following colloquy *339 when the file in the habeas corpus proceeding was offered in evidence:
 "Mr. Fox: It occurred to me as we recessed yesterday that I should like to offer an additional defense and discuss it later at the proper time. However, I wanted counsel to have the opportunity of being aware of my intention as soon as possible, and with that in mind I asked the clerk to procure for me the file of the Superior Court of the State of California No. 23191. It was a habeas corpus matter, in the Matter of Stacey Elliott Owens, in which the heading is 'Elizabeth Yeldell Strong, Plaintiff, vs. Stacey Elliott Owens and Faye Owens, his wife, Defendants,' and I shall ask later that we may have the additional defense by way of answer, of res judicata, at which time I shall argue further about the petition herein being denied, and for that purpose I ask that this file be received in evidence and referred to. [Emphasis added.] ..."
 "Mr. Taintor: No objection. Of course, we will have an opportunity to make a few comments about that ourselves."
 "The Court: Oh, yes."
 "Mr. Fox: I merely make it at this time, as I say, for your benefit."
 "The Court: So that he won't be surprised."
 "Mr. Fox: That is right, your Honor."
 The record is devoid of any motion to amend the pleadings and no amendment has been filed. A party in order to avail himself of the plea of res judicata must allege affirmatively such judgment in his pleading if there be an opportunity to do so and if there be no such opportunity the judgment itself may be used as evidence. (Code Civ. Proc.,  1962, subd. 6; Madruga v. Borden Co., 63 Cal.App.2d 116, 123 [146 P.2d 273]; Rideaux v. Torgrimson, 12 Cal.2d 633, 638 [86 P.2d 826].) The defense of res judicata is waived unless it is pleaded. (Reeh v. Reeh, 69 Cal.App.2d 200, 206 [158 P.2d 751].)
 Defendants urge that despite the fact the defense was not pleaded, it was presented without objection and it is too late for plaintiff to object to the defense on appeal. The file in the habeas corpus proceedings was introduced with the understanding that defendants would ask later to amend their pleadings to show the additional defense and the file was offered in evidence solely so that plaintiff's counsel would not be surprised. Defendants not having availed themselves of the defense by affirmatively pleading it have waived it. *340
 [2] The certificate which defendants contend was erroneously received in evidence consists of a letter from plaintiff's husband in which he declared his willingness to receive the child in his home and support him. The letter in question was introduced for the sole purpose of rebutting letters previously introduced into evidence by defendants whereby they attempted to show that plaintiff's husband was not in favor of taking the child. The trial court admitted it for that limited purpose, stating that it could go in for what it was worth. Moreover, if it were error for the court to have admitted the so-called "certificate," it was not prejudicial since the consent of plaintiff's husband is not necessary.
 [3] Under section 200 of the Civil Code the mother of an illegitimate child is entitled to its custody. If the father complies with the requirements of section 230 of the Civil Code for the adoption of an illegitimate child its status becomes that of the legitimate child of both of its natural parents and, as stated in In re Navarro, 77 Cal.App.2d 500, 505 [175 P.2d 896], "the rights of the child and of the parents thenceforth are the same as they would be had the child been born of the marriage of its natural parents. To this extent, then, the rights of the natural mother as set forth in section 200 of the Civil Code are modified for the benefit of the child, and neither of its parents has a superior right to its custody, services or earnings." Thus, plaintiff as the mother of the illegitimate child either has an absolute right to its custody or an equal right with that of its father if the child be considered as having been legitimated by adoption.
 [4] The trial court in considering the interest and welfare of the child found that it was for the best interest of the minor to place him in the custody of his mother. Neither of the parties has contended that the other is unfit and there is no evidence that either is not a fit and proper person to have custody. There is evidence that both are able to care for and support the child. The trial court has a large measure of power in fixing the custody of children and in the absence of a showing of manifest abuse of discretion its decree will not be interfered with on appeal. (Runsvold v. Runsvold, 61 Cal.App.2d 731, 733 [143 P.2d 746].) The trial court having determined that the best interest of the child will be subserved by giving the mother custody and there being no evidence of an abuse of discretion, its decision is conclusive upon this court. (In re Navarro, supra, at p. 509; Munson v. Munson, 27 Cal.2d 659, 666 [166 P.2d 268].) *341
 [5] Defendants' final contention that it was an abuse of discretion for the trial court to award custody of the minor child to plaintiff without restricting her right to remove him from the jurisdiction of the court is likewise untenable. In the case of White v. White, 68 Cal.App.2d 650, 651 [157 P.2d 415], it was held that the trial court did not abuse its discretion in permitting a divorced mother, following her remarriage, to take her child of whom she had custody from the state. We see no reason, therefore, why it should be an abuse of discretion for the trial court in the instant case not to enjoin the mother from taking the child from the state. (See, also, Engasser v. Engasser, 75 Cal.App.2d 80, 82 [170 P.2d 116].)
 [6] No reason has been advanced for the denial to the father of his right to visit his child and if he desires to do so he has a right to be admitted to see the infant at all convenient times. (Wand v. Wand, 14 Cal. 512, 518.)
 The judgment is affirmed without prejudice to the right of defendant Stacey Elliott Owens to petition the court for an order requiring plaintiff to make reasonable arrangements for him to visit the child and to keep him advised at all times of the address where the child is domiciled.
 Moore, P. J., and McComb, J., concurred.
