
396 Mass. 68 (1985)
483 N.E.2d 1094
P.B.C.
vs.
D.H.
Supreme Judicial Court of Massachusetts, Middlesex.
May 8, 1985.
October 10, 1985.
Present: HENNESSEY, C.J., WILKINS, LIACOS, ABRAMS, & O'CONNOR, JJ.
Steven I. Dean for the defendant.
Malcolm M. Donahue for the minor.
Muriel N. Carpenter for the plaintiff.
O'CONNOR, J.
The plaintiff in this case contends that he has a right to an adjudication of whether he is the father of a child conceived while the child's mother, the defendant, was married to another man. We hold that in the circumstances of this case he has no such right.
*69 The complaint, filed in the Probate and Family Court, requests that the court declare the plaintiff to be the natural father of the child and that he be granted custody of the child, or, if not custody, then visitation rights. The plaintiff moved that the court order that he, the mother, and the child submit to a Human Leukocyte Antigen (HLA) white blood cell test. A judge denied the motion. Thereafter, there were proceedings in the Appeals Court and before a single justice of this court, as well as further proceedings in the trial court, resulting in the allowance of the plaintiff's motion and an order that the plaintiff, the mother, and the child submit to the test on a specified date.
When the mother and the child failed to submit to the test, a judge of the trial court imposed sanctions by ordering that the mother would be deemed to have made certain concessions favorable to the plaintiff's claim. The plaintiff then moved that the case be scheduled for trial, but, before a trial date was assigned, the mother moved to dismiss the complaint on the ground that the plaintiff lacked standing to litigate the question of his paternity. Taking into account the earlier proceedings relative to the blood test, an affidavit that had been filed by the plaintiff, and certain "undisputed evidence," a judge concluded that allowance of the motion to dismiss at that time was inappropriate, and he denied the motion. At the same time, he ordered the mother and the child to submit to the HLA test. The order provided that the possible consequences of noncompliance would be preclusion of the mother from offering evidence at trial on the issue of paternity, incarceration until she complied with the order, and assessment of "daily costs" against her.
The next procedural step was that the mother filed in the Appeals Court a petition for review of the denial of her motion to dismiss the complaint. A single justice of that court reasoned that if the test were administered and showed that the plaintiff was the child's natural father, and if then, on appeal, it was decided that the plaintiff had no standing to assert his paternity, serious and longlasting emotional damage might unnecessarily be caused to the child. Accordingly, the single justice authorized *70 an interlocutory appeal to the Appeals Court from the denial of the mother's motion to dismiss the complaint, and he ordered a stay of further proceedings in the trial court. We transferred the case to this court on our own initiative. We remand the case to the Probate and Family Court for the entry of an order dismissing the complaint.
The trial judge and the single justice of the Appeals Court relied on matters outside the pleadings in making their rulings. The parties, too, in their briefs on appeal, rely on facts not pleaded. Therefore, we treat the motion to dismiss as a motion for summary judgment, and we consider the facts to be those expressly or impliedly set forth in the pleadings, affidavits, and briefs of the parties, and about which there appears to be no controversy.
Those facts are as follows. For an extended period of time before September, 1981, while the mother was married to another man, the mother and the plaintiff had a sexual relationship.[1] The mother filed a complaint for divorce in May, 1981. The child was conceived the following September. A judgment of divorce nisi was entered on December 8, 1981. The divorce became final on June 9, 1982, and the child was born the next day. The child has lived with the mother since birth and has never lived with the plaintiff. Since September, 1983, the mother has not allowed the plaintiff access to the child. The complaint in this case was filed on September 6, 1983, and after that the mother and her former husband remarried.
By affidavit and in her brief the mother asserts other facts which the plaintiff appears to concede. Those facts are that her remarriage to her former husband occurred on September 12, 1983, the child's birth certificate lists her husband as the father, the husband has never denied his paternity, and since September, 1983, the mother, her husband, the child in question, *71 and an older child of the mother and her husband have lived together continuously. We make those assumptions.
This court has held that a child born to a married woman is presumed to be the child of the mother's husband. Commonwealth v. Leary, 345 Mass. 59, 60 (1962). That presumption of legitimacy may not be rebutted, even in a civil case, "except on facts which prove, beyond all reasonable doubt, that the husband could not have been the father." Phillips v. Allen, 2 Allen 453, 454 (1861). We hold today that a child conceived by a married woman is presumed to be the child of the man to whom the mother was then married even if the mother and the husband are divorced at the time of the child's birth. Our holding fosters the important social policy of affording legitimacy to children whenever possible. See Powers v. Steele, 394 Mass. 306, 310 (1985); Green v. Kelley, 228 Mass. 602, 605 (1917). The plaintiff has not urged us to hold otherwise. He simply argues that he should be permitted to rebut that presumption.
Here, the mother was married at the time the child was conceived. The child, therefore, is presumed to be the husband's child. Although we have held that the presumption of legitimacy may be rebutted, and we have defined the burden of proof in that regard, we have never confronted the question whether the presumption may be rebutted by a man claiming to be the child's natural father. Nor does any statute answer the question.
The question was not before us in Normand v. Barkei, 385 Mass. 851, 853 (1982), on which the plaintiff relies as support for his contention that he has a right to prove that he is the child's father. Normand v. Barkei, supra, sheds little light on the issue before us because in that case the children's mother was unmarried when the children were conceived and were born. There was no question of legitimacy. The plaintiff simply sought an order granting him visitation rights with respect to two children unquestionably illegitimate, that he claimed were his children.
We must decide for the first time, then, whether, in the circumstances of this case, a man is constitutionally entitled *72 to a judicial determination of whether he is the natural father of a child conceived while the mother was married to another man. We conclude that he does not have that constitutional right. We further conclude, as a matter of public policy, that in the circumstances of this case we should not recognize in the plaintiff a common law right to a paternity adjudication.
The plaintiff contends that denying him the opportunity to establish his paternity would deprive him of the due process of law guaranteed by the Fourteenth Amendment to the United States Constitution. He relies on Stanley v. Illinois, 405 U.S. 645 (1972). In that case, the Supreme Court stated, "The private interest here, that of a man in the children he has sired and raised, undeniably warrants deference and, absent a powerful countervailing interest, protection." Id. at 651. An understanding of the meaning and limits of that statement is aided by an appreciation of the context in which the statement was made. Stanley involved an acknowledged father's efforts to prevent his children from being declared wards of the State upon the death of their mother with whom Stanley had intermittently lived for eighteen years. At the time of the conception and birth of the children, the mother was unmarried, as was Stanley. Unlike this case, no presumption of legitimacy was involved. An Illinois statute, conclusively presuming that a father of an illegitimate child is an unfit parent, provided that upon the mother's death the child would automatically become a ward of the State. Focusing on the "cognizable and substantial" interest of a man in the children "he has sired and raised," the Supreme Court held that the conclusive presumption denying Stanley a right to be heard on his fitness as a parent violated Stanley's right to due process. Id. at 649-652.
We continue to recognize, as we did in Normand v. Barkei, supra, that ordinarily an unwed father has a legally protectable interest in his children, and that he is entitled to establish that he is their natural father. But it does not follow, and Stanley v. Illinois, supra, does not require, that, in all circumstances, a man claiming to be the father of a child conceived while the child's mother is married to another man is constitutionally entitled to be heard on the question of paternity.
*73 As the plaintiff recognizes in his brief, "the guaranty of due process ... demands only that the law shall not be unreasonable, arbitrary or capricious, and that the means selected shall have a real and substantial relation to the object sought to be attained." Nebbia v. New York, 291 U.S. 502, 525 (1934). The Commonwealth has legitimate and strong interests in "the strengthening and encouragement of family life for the protection and care of children," G.L.c. 119, § 1 (1984 ed.), and in affording legitimacy to children. Powers v. Steele, 394 Mass. 306, 310 (1985). Denying a plaintiff the right to establish his paternity in the circumstances of this case promotes those interests. Not only was the child's mother married to a man other than the plaintiff when the child was conceived, but also the husband (the presumed father) has never denied that he is the child's natural father. Furthermore, the child's mother and the presumed father have been remarried almost since the filing of the complaint herein, and, since that time, they have continued to maintain a family unit which includes the child. Although appropriate social policy might be clearer if the marriage had been uninterrrupted since the child was conceived, we are satisfied that, in the circumstances obtaining here, denying the plaintiff a right to litigate his paternity bears a substantial relationship to the aforementioned interests of the Commonwealth, and, therefore, does not violate the plaintiff's right to due process. Here, unlike in Stanley v. Illinois, supra, there is a "powerful countervailing interest" that justifies withholding the relief the plaintiff seeks. Our holding finds support in other jurisdictions. See Vincent B. v. Joan R., 126 Cal. App. 3d 619, 624-627 (1981); Petitioner F. v. Respondent R., 430 A.2d 1075, 1078-1079 (Del. 1981); A. v. X, Y, & Z, 641 P.2d 1222, 1226-1227 (Wyo. 1982).
The plaintiff's constitutional argument is not limited to the due process clause of the Fourteenth Amendment. He relies also on the Fourteenth Amendment's equal protection clause and on art. 106 of the Amendments to the Constitution of the Commonwealth (the Equal Rights Amendment). The plaintiff's sole argument regarding these constitutional provisions is that to deny him the right to seek an adjudication of his paternity *74 while allowing the child's mother to do so[2] is to establish classifications based on sex, and that such classification is not constitutionally justified by its relationship to any sufficiently important interest of the Commonwealth. It is true that "[g]ender-based distinctions `must serve important governmental objectives and must be substantially related to achievement of those objectives' in order to withstand judicial scrutiny under the Equal Protection Clause." Caban v. Mohammed, 441 U.S. 380, 388 (1979), quoting Craig v. Boren, 429 U.S. 190, 197 (1976). It is also true that "classification based on sex is subject to strict judicial scrutiny under the State [Equal Rights Amendment] and will be upheld only if a compelling interest justifies the classification and if the impact of the classification is limited as narrowly as possible consistent with its proper purpose." Lowell v. Kowalski, 380 Mass. 663, 666 (1980). But those constitutional principles do not apply in this case because the described classifications are not gender-based. Not only mothers, but presumed fathers as well, may initiate proceedings raising the issue of the child's paternity. Symonds v. Symonds, 385 Mass. 540, 544 (1982).
That the distinction between those who may initiate paternity proceedings and those who may not do so is not based on sex is enough to defeat the plaintiff's argument. Further discussion, however, is appropriate. Even though no gender-based classification has been established, "[e]qual protection of the laws requires ... that all persons in the same category and in the same circumstances be treated alike." Opinion of the Justices, 332 Mass. 769, 779-780 (1955). That requirement is met here. The plaintiff is not "in the same category and in the same circumstances" as the mother and her husband, the presumed father, who, with the child in question and another child, constitute a family unit. A challenge to the presumption that the husband is the child's father, brought by a stranger to the marriage, such as the plaintiff, has the likely effect of seriously *75 disrupting an intact marriage and family contrary to the interests of the Commonwealth. When the same challenge is made by someone within the family, the ruptures in the marriage and the family, most often, have already taken place, and even when the family is intact, those within the family are in far better position than is an outsider fairly to decide whether the family can survive the challenge presented by litigation of the paternity issue. These considerations justify treating persons outside the family differently from persons within it. Vincent B. v. Joan R., supra at 627; Petitioner F. v. Respondent R., supra at 1080; A. v. X, Y, & Z, supra at 1224-1226. But see R.McG. v. J.W., 200 Colo. 345, 349-354 (1980).
We conclude that in the circumstances presented by this case a man does not have a constitutional right to an adjudication of whether he is the father of a child conceived while the child's mother was married to another man. Also, because of the social policy we have discussed above in favor of affording legitimacy to children, whenever possible, and of "strengthening and encourag[ing] family life for the protection and care of children," we conclude that we should not recognize in the plaintiff a common law right to such an adjudication. We express no opinion as to whether the child could, at some point, for the purpose of establishing inheritance rights or for any other purpose, bring an action attempting to prove that the plaintiff is his natural father. We remand the case to the Probate and Family Court with instructions to enter an order dismissing the plaintiff's complaint.
So ordered.
NOTES
[1]  The parties dispute whether their sexual relationship continued into September, October, and November, 1981. They also dispute the extent to which the mother and her husband lived together between late 1981 and the summer of 1983. We make no assumptions as to those facts or other facts in controversy. Resolution of the controverted facts would not affect our decision.
[2]  "The mother herself is the proper party to seek a complaint for adjudication of paternity, for expenses of the pregnancy and support of the child." Baby X v. Misiano, 373 Mass. 265, 265 (1977).
