of the pronouncement on the issue in question by the Supreme Court and the High Courts, in our view, in child custody matters, the writ of habeas corpus is maintainable where it is proved that the detention of a minor child by a parent or 12others was illegal and without any authority of law. 20. In child custody matters, the ordinary remedy lies only under the Hindu Minority and Guardianship Act or the Guardians and Wards Act as the case may be. In cases arising out of the proceedings under the Guardians and Wards Act, the jurisdiction of the court is determined by whether the minor ordinarily resides within the area on which the court exercises such jurisdiction. There are significant differences between the enquiry under the Guardians and Wards Act and the exercise of powers by a writ court which is summary in nature. What is important is the welfare of the child. In the writ court, rights are determined only on the basis of affidavits. Where the court is of the view that a