Petitioner appeals from an order dismissing a writ of habeas corpus. The proceeding was instituted to determine the paternity and custody of a child of which respondent is the mother and petitioner claims to be the father. The respondent is a married woman and at the time the child was bom and for several years prior thereto was living with her husband. The presumption of legitimacy is thus strong and both respondent and her husband claim the legitimacy of the child.
The trial court did not determine the issue of paternity, but ruled that although the petitioner might be the father of the child the court would not be warranted in holding that the best interests of the child required that its custody be taken away from respondent or even that petitioner should be given the right of visitation. Accordingly, the writ of habeas corpus was dismissed.
We think the dismissal of the writ was clearly correct and would affirm without opinion except for petitioner’s contention that the decision of the trial court beclouds the legitimacy of the child and that a subsequent filiation *897proceeding might be brought against him. Petitioner urges, therefore, that the issue of paternity and the future status of the child and his relation to the parties he adjudicated now.
The child was not a party to the proceeding, no special guardian having been appointed for him. If there were occasion to pass upon the paternity of the child, the case would have to be remitted for the appointment of a special guardian and for a further hearing. We see no need, however, for a further inquiry. ] „ j
In view of the respondent’s marital status and cohabitation with her husband at the time of the conception and birth of the child and of their recognition of the child as their own, petitioner should not be heard to impugn the legitimacy of the child. There was no occasion in the opinion of the court to question the legitimacy of the child. Mor need petitioner have any concern about any further possible claim being made against him in reference to the child. The position taken by respondent and her husband in this case is binding upon them and forecloses any future challenge of the legitimacy of the child by either of them.
It is perhaps important, as petitioner suggests, not to leave doubts unresolved. By our decision, we remove any question which might possibly remain under the opinion of Special Term. Our ruling is that upon the record the legitimacy of the child is unquestioned and unquestionable.
For the reasons stated, the order appealed from is affirmed, with costs to respondent.
Peck, P. J., Callahan, Van Voorhis, Shientag and Bergan, JJ., concur.
Order unanimously affirmed, with costs to the respondent. [See post, p. 1064.]