In a custody proceeding pursuant to Family Court Act article 6, and a related habeas corpus proceeding, the attorney for the children appeals (1), by permission, from an order of the Family Court, Kings County (Sheares, J.), dated May 3, 2010, which, without a hearing, awarded temporary custody of the children to the father until March 14, 2011, and (2) from an order of the same court dated May 21, 2010, which sustained the father’s petition for a writ of habeas corpus and directed the mother to return the children to the father. By decision and order on motion of this Court dated July 12, 2010, enforcement of the orders was stayed pending the hearing and determination of the appeals.
Ordered that the order dated May 3, 2010, is reversed, on the law and in the exercise of discretion, without costs or disbursements, and the matter is remitted to the Family Court, Kings County, for a hearing and new determination before a different Judge, to be held forthwith; and it is further,
*873Ordered that the order dated May 21, 2010, is reversed, on the law, without costs or disbursements, and the petition for a writ of habeas corpus is dismissed.
This case involves a custody dispute between the father of the subject children, who are teenagers, and their adult sister, who had custody of the subject children, based upon an agreement with the mother, which was later revoked.
The general rule is that, while temporary custody may be granted without a hearing, “where sufficient facts are shown by uncontroverted affidavits, it is error as a matter of law to make an order respecting custody, even in the pendente lite context, based on controverted allegations without having had the benefit of a full hearing” (Carlin v Carlin, 52 AD3d 559, 560 [2008]). Further, temporary custody should not be awarded to a parent where there are questions of fact as to whether the parent awarded temporary custody is a suitable temporary custodian (see Matter of Jesse M. [Cynthia L.], 73 AD3d 780 [2010]). In the case of custody disputes between parents and nonparents, the State “may not deprive a parent of the custody of a child absent surrender, abandonment, persisting neglect, unfitness or other like extraordinary circumstances” (Matter of Bennett v Jeffreys, 40 NY2d 543, 544 [1976]).
Here, the allegations of the children and their adult sister raise significant issues as to the father’s fitness to assume custody, thereby requiring a hearing. In particular, the evidence was uncontroverted that the father moves back and forth between the United States and the Dominican Republic on a regular basis. The father is absent from the United States for extended periods of time, and his living arrangements with others are not appropriate living accommodations for the children. Further, considering the ages of the children, their refusal to stay with the father, in and of itself, may constitute an extraordinary circumstance (see Matter of Alexander N., 5 AD3d 776 [2004]).
Accordingly, the matter must be remitted to the Family Court, Kings County, for a hearing and new determination, to be held forthwith. In light of insensitive and intemperate remarks made by the Judge who rendered the initial determination, the hearing should be held before a different Judge.
We further note that the writ of habeas corpus failed to direct the mother to produce the children in court, instead directing her to return the children immediately to the father. The purpose- of a writ of habeas corpus is to require production of a child in court so that the court, after “due consideration,” may make a determination as to custody (Domestic Relations Law *874§ 70 [a]; see Family Ct Act § 651 [b]). No such “due consideration” was afforded here. Skelos, J.P., Eng, Hall and Lott, JJ., concur.