OPINION OF THE COURT
COPERTINO, J. We affirm the Family Court’s order granting custody to the father. It is well settled that the preeminent concern in child custody matters is the best interests of the child (see, Eschbach v Eschbach, 56 NY2d 167; Friederwitzer v Friederwitzer, 55 NY2d 89). Inasmuch as no prima facie right to custody exists in favor of either parent (see, Domestic Relations Law §§ 70, 240), the court is obliged to conduct a comprehensive hearing and to carefully consider all relevant factors in rendering its decision; the court’s determination, made after such a hearing, is entitled to great weight and should not lightly be set aside (see, Eschbach v Eschbach, supra, at 171-174). Upon a review of the record, we conclude that no reason exists to disturb the determination made in this case and agree with the Family Court that the best interests of the child will be served by awarding custody to the father.
We turn now to the order in which the Family Court denied both parties’ applications for counsel fees, without passing on its power to make an award of counsel fees. The principal question of law to be considered is whether the Family Court has the power to make an award of counsel fees where a custody proceeding was initiated in that court. Without discussing this issue, intermediate appellate courts have approved awards of counsel fees in custody proceedings initiated *18in the Family Court (see, Matter of Kriete v Kriete, 194 AD2d 676; Matter of Sooy v Sooy, 101 AD2d 287, affd sub nom. Matter of Louise E. S. v W. Stephen S., 64 NY2d 946), and in other procedural contexts (see, Burke v Burke, 174 AD2d 973 [custody proceeding pursuant to Uniform Child Custody Jurisdiction Act]; Matter of McDonald v McDonald, 94 AD2d 856 [application to modify prior custody award of Family Court]). The Appellate Division, First Department, also has indicated that it would approve an award of counsel fees where a permanent order of custody has been made by the Family Court (see, Pfeiffer v Byrne, 74 AD2d 791, affd 53 NY2d 1021).
The Family Court itself, however, has addressed the issue of its power directly. Several courts have determined that the requisite power is conferred by Family Court Act § 651 (b) and Domestic Relations Law § 237 (b). They have concluded that these sections must be read together, and when so read, provide the jurisdiction needed to make an award of counsel fees (see, Berson v Berson, 149 Misc 2d 523, 525; Matter of Gloria A. P. v Harold E. P., 137 Misc 2d 1051, 1052; Matter of Dagaev v Dagaev, 90 Misc 2d 962, 963). In one case the Supreme Court denied a writ of prohibition against the Family Court on this basis as well (see, Matter of Peterson v Ray, 138 Misc 2d 31, 33).
Upon the referral of a custody matter from the Supreme Court to the Family Court (see, Family Ct Act § 652), the Family Court enjoys the same powers as the Supreme Court, and inasmuch as the referring court could make an award of counsel fees—had it retained the matter—the Family Court clearly may do so as well (see, Family Ct Act § 651 [a]; Domestic Relations Law § 237 [b]; see also, Matter of Kapzynski v Kapzynski, 30 AD2d 962). Where the custody matter is initiated in the Family Court, the power to award counsel fees is not quite as clear, but a fair reading of Family Court Act § 651 indicates that the Family Court does have the power to apply Domestic Relations Law § 237 (b) and make an award in this situation as well.
Family Court Act § 651 (a) and (b), insofar as are relevant, provide as follows:
"§ 651. Jurisdiction over habeas corpus proceedings and petitions for custody and visitation of minors. "(a) When referred from the supreme court or county court to the family court, the family court has jurisdiction to *19determine, with the same powers possessed by the supreme court in addition to its own powers, habeas corpus proceedings and proceedings brought by petition and order to show cause, for the determination of the custody or visitation of minors. "(b) When initiated in the family court, the family court has jurisdiction to determine, with the same powers possessed by the supreme court in addition to its own powers, habeas corpus proceedings and proceedings brought by petition and order to show cause, for the determination of the custody or visitation of minors”. The only distinction between subdivisions (a) and (b) is that the former begins with the phrase "[w]hen referred from the supreme court or county court to the family court”, instead of "[w]hen initiated in the family court.” The relevant language is otherwise identical. Given this precise repetition of subdivision (a) in subdivision (b), subdivision (b) cannot be read as limiting the Family Court’s power to something less than that of the Supreme Court in the area of custody simply because the proceeding originated in the Family Court. The jurisdiction of the Family Court is only affected where a divorce action or custody proceeding is pending in the Supreme Court. In such a case, the Family Court is divested of jurisdiction to hear the custody matter altogether absent a referral by the Supreme Court (see, NY Const, art VI, § 13 [b] [2]; Family Ct Act § 652; Matter of Poliandro v Poliandro, 119 AD2d 577, 578-579). It is very much an "all or nothing” proposition. Domestic Relations Law § 237 (b), which grants the Supreme Court the power to award counsel fees, states that "[u]pon any application * * * by writ of habeas corpus or by petition and order to show cause concerning custody [and] visitation * * * the court may direct a spouse or parent to pay such sum or sums of money for the prosecution or the defense of the application or proceeding by the other spouse or parent as, in the court’s discretion, justice requires, having regard to the circumstances of the case and of the respective parties”. In view of the foregoing, a strained and unnatural reading of these statutes is required to conclude that the Family Court does not have the power to award counsel fees where the custody matter was properly initiated in that court, but may do so where it receives the matter from the Supreme Court. No reasonable basis can be found for making this distinction (see, McKinney’s Cons Laws of NY, Book 1, Statutes §§ 97, 98).
Accordingly, we hold that the Family Court was empowered *20to award counsel fees to the mother. We note that the court properly considered her application even though the father was awarded custody. An award made pursuant to Domestic Relations Law § 237 (b) is to be based on the financial circumstances of the parties and the circumstances of the case as a whole, which may include the relative merit of the parties’ positions, but should not be predicated solely on who won and who lost (see, DeCabrera v Cabrera-Rosete, 70 NY2d 879, 881; Hirsch v Hirsch, 142 AD2d 138, 146). However, upon a review of the facts, we conclude that, based upon the financial circumstances of the parties, the court erred in its determination that the mother was not entitled to counsel fees. We find that the mother is entitled to an award for reasonable counsel fees incurred with respect to the second hearing held in the instant proceeding, which culminated in the custody order dated March 20, 1990. We therefore remit the matter to the Family Court for a determination of those fees. We concur with the Supreme Court that the mother is not entitled to counsel fees incurred with respect to the first hearing in this matter, which culminated in the order dated January 10, 1990, because her application for those fees was untimely.
Accordingly, the order dated March 20, 1990, which awarded the father custody is affirmed, without costs or disbursements. The order which denied the mother’s application for counsel fees is modified, on the law, by deleting the provision thereof which denied that branch of the mother’s application for counsel fees which requested counsel fees incurred with respect to the second hearing culminating in the custody order dated March 20, 1990, and substituting therefor a provision granting that branch of the application, and as so modified, that order is affirmed, without costs or disbursements, and the matter is remitted to the Family Court, Suffolk County, for determination of what would constitute reasonable counsel fees incurred with respect to the second hearing culminating in the custody order dated March 20, 1990.
Bracken, J. P., Balletta and Eiber, JJ., concur. Ordered that the order dated March 20, 1990, which awarded the father custody, is affirmed, without costs or disbursements; and it is further,
Ordered that the order dated March 20, 1990, which denied the mother’s application for counsel fees, is modified, on the law, by deleting the provision thereof which denied that *21branch of the mother’s application for counsel fees which requested counsel fees incurred with respect to the second hearing culminating in the custody order dated March 20, 1990, and substituting therefor a provision granting that branch of the application; as so modified, the order is affirmed, without costs or disbursements, and the matter is remitted to the Family Court, Suffolk County, for determination of what would constitute reasonable counsel fees incurred with respect to the second hearing culminating in the custody order dated March 20, 1990.