Order unanimously affirmed without costs. Memorandum: No appeal lies as of right from an intermediate order in a habeas corpus proceeding (see, CPLR 5701 [a]; 7011). In the exercise of our discretion, we treat the notice of appeal as an application for permission to appeal and grant permission (see, CPLR 5701 [c]).
Supreme Court properly denied respondents’ motion to dismiss the habeas corpus petition. Respondents contend that petitioner is precluded from seeking habeas corpus relief because the proper remedy is an order under article 81 of the Mental Hygiene Law. We disagree. "A person illegally imprisoned or otherwise restrained in his liberty within the state * * * may petition without notice for a writ of habeas corpus to inquire into the cause of such detention and for deliverance” (CPLR 7002 [a]). "[T]he availability, to one unlawfully detained, to relief by way of statutory remedy other than habeas corpus does not in and of itself preclude the granting of habeas corpus” (Matter of Siveke v Keena, 110 Misc 2d 4, 7; see also, Matter of Williams v Director of Long Is. Home, 37 AD2d 568). Petitioner asserted in the petition that 89-year-old Ruth E. Wittle is being imprisoned and restrained of her liberty by respondents. Petitioner further asserted that time is of the essence because Wittle is elderly and showing signs of dementia and that respondents had removed her from her apartment and had concealed her whereabouts from her friends and family. Thus, although a proceeding under article 81 of the Mental Hygiene Law may eventually be appropriate, Supreme Court properly exercised its discretion in denying the motion to dismiss the habeas corpus petition (see, Kohler v Pincheva, 125 Misc 2d 597; Matter of Siveke v Keena, supra).
We further conclude that the court did not err in ordering a psychiatric evaluation of Wittle and in ordering that she pay rent on her former residence during the pendency of this proceeding. A psychiatric evaluation is necessary to determine *970whether Wittle is being unlawfully detained by respondents (see, State of New York ex rel. Headley v Connor, 87 AD2d 511, 512). The payment of rent on the former residence is necessary so that, if the court determines that Wittle is being unlawfully detained, she can be returned to her former residence.
Finally, we conclude that the court did not err in permitting respondent Joan Casey to continue as one of Wittle’s home health care aides. The court directed the guardian ad litem to secure the necessary number of additional home care aides to care for Wittle and to report any problems back to the court. (Appeals from Order of Supreme Court, Erie County, Sconiers, J. — Habeas Corpus.) Present — Fallon, J. P., Callahan, Doerr and Davis, JJ.