Order of the Supreme Court, New York County (Kenneth Shorter, J.), entered March 8, 1988, which granted petitioner’s writ of habeas corpus, modified, on the law, to grant petitioner a transfer to a nonsecure facility, and is otherwise affirmed without costs. The order of the same court, entered April 22, 1988, which set forth conditions controlling petitioner’s release from in-patient status, is vacated, and the matter is remanded to the trial court for preparation of a new order of conditions controlling petitioner’s transfer to a nonsecure facility. The appeals from the order of April 22, 1988 are dismissed as academic, without costs.
This is an appeal by the Commissioner of Mental Health and the District Attorney from an order releasing petitioner from the former’s custody on a writ of habeas corpus, subject to an order of conditions. Petitioner has been in the custody of the Commissioner pursuant to CPL 330.20 since May 1979 when, after a bench trial, he was found not guilty of murder by reason of mental disease or defect, to wit, paranoid schizophrenia. This dangerous mental disorder caused petitioner to think that his seven months’ pregnant common-law wife, her three-year-old son, and the family dog were possessed by the devil, a delusion that petitioner acted out in February 1978 when he beat, bludgeoned and strangled to death his wife and stepson, and threw the dog out the window.
Petitioner instituted this habeas corpus proceeding in August 1987. Therein, he alleged that in March 1987 he and several other patients fell under suspicion of smoking marihuana on the ward behind a closed bathroom door, and that as a consequence he was requested by his treating psychiatrist, Dr. Schofield, to provide a urine specimen to determine whether he had ingested that substance. Petitioner refused, invoking a constitutional right to privacy. As it happens, at this very time the Office of Mental Health, acting pursuant to regular and mandated administrative procedures, was preparing a court application for petitioner’s transfer from Kirby Forensic Psychiatric Center, a secure facility in which petitioner has been confined since February 1985, to a nonsecure facility. According to Dr. Schofield, whose affidavit was to be submitted in support of this application, petitioner’s transfer to a nonsecure facility was warranted since he was not a dangerous person. However, that affidavit, although signed, was never submitted to the court because, petitioner contends, *342of his refusal to take the urine test. Indeed, petitioner alleges that Dr. Schofield actually told him that if he took the test the results would not affect the recommendation for a transfer one way or the other, but that if he refused to take the test the recommendation would be withdrawn.
Dr. Schofield’s report recommending petitioner’s transfer to a nonsecure facility "as a non-dangerous person” is dated February 9, 1987. It was approved in writing by Kirby’s forensic committee and clinical director on February 17, 1987, reduced to the form of an affidavit signed by Dr. Schofield on March 12, 1987, forwarded to the Office of Mental Health’s Bureau of Forensic Services on March 13, 1987, and approved by the latter on March 19, 1987. At that point, only the approval of the Commissioner himself was still required. On March 17, 1987, petitioner fell under suspicion of using marihuana, and on March 21, 1987, Dr. Schofield notified Kirby’s clinical director of his desire to withdraw his recommendation for a transfer. On March 23, 1987, the Commissioner returned petitioner’s file to Kirby not approved for transfer.
Petitioner’s main point is that it was arbitrary and capricious of the Commissioner not to apply for a transfer order solely because of petitioner’s refusal, based on nothing less than a constitutional right, to take the urine test. Petitioner originally challenged this decision in June 1987 by bringing a CPLR article 78 proceeding against the Commissioner, but instituted this proceeding when the Commissioner interposed an affirmative defense in the article 78 that petitioner’s remedy, if any, was a writ of habeas corpus. The operative allegations of the habeas corpus petition are the same as those in the article 78 petition, although there is in addition an allegation that petitioner is not mentally ill, and thus should be released from in-patient status and not merely transferred to a nonsecure facility. The article 78 proceeding was dismissed as a matter of law, albeit without prejudice to petitioner instituting a habeas corpus proceeding, which he had already done. The theory of that dismissal, which was not appealed by petitioner, was that the decision not to apply for a transfer order was discretionary with the Commissioner, and therefore not subject to mandamus.
No return, as such, was filed by respondents in the habeas corpus proceeding, the parties apparently agreeing to use the Commissioner’s answer in the article 78. Therein, it was alleged that all of the patients on petitioner’s ward were requested to provide specimens for urinalysis after the incident of March 17, 1987, and that petitioner was the only one *343who refused to do so. While acknowledging that petitioner’s refusal to take the test was a factor in deciding not to apply for a transfer order, the Commissioner maintained that such refusal was "but one example” of an "oppositional and hostile attitude towards staff’ and to the treatment program that was of sufficient clinical significance to cause the Commissioner, "in the conscientious exercise of his professional judgment and discretion, [to be] presently unable to adopt the view that [petitioner] does not have a dangerous mental disorder”.
We think it not against the weight of the evidence to conclude that respondents did not show at the hearing any examples of oppositional behavior by petitioner other than his refusal to take the urine test, and that petitioner is entitled to relief if for no other reason than that respondents’ defense was made to depend precisely on such a showing. Dr. Schofield’s testimony did not point to the occurrence of any particular incidents between February 9, 1987, when he prepared his report, and March 21, 1987, when he withdrew it, which could have caused him to believe that petitioner’s condition had deteriorated during that period to such an extent as to make him too dangerous for transfer to a nonsecure facility. Such incidents as might have occurred before February 9, 1987 do not serve to explain the many admissions made in the report as to petitioner’s nondangerousness, and the several incidents relied upon by respondents that occurred after the withdrawal of the report were either discredited by the trial court as a matter of fact or deemed, upon the basis of credible expert testimony, to be not indicative of dangerousness.
While we hold that the trial court’s finding that petitioner is not suffering from a dangerous mental disorder is not against the weight of the evidence, and therefore conclude that petitioner should not be in a secure facility, we disagree with the trial court that he should be released from in-patient status, as opposed to merely transferred to a nonsecure facility. In reaching this result, we think it sufficient that even petitioner’s own expert, a staunch proponent of the view that petitioner is not mentally ill, nevertheless favors only a gradual release, with a period of time spent in a nonsecure facility designed to readjust petitioner to life outside mental hospitals. Whether petitioner is actually mentally ill or not is a question that can be decided on the Commissioner’s pending application for a subsequent retention order, which should now, in view of petitioner’s transfer, be deemed an application for a recommitment order pursuant to CPL 330.20 (14).
The order of conditions must be vacated since it was pre*344pared for the purpose of implementing petitioner’s release, and a new order of conditions should be proposed by the Commissioner for review by the trial court, and comment or opposition by the petitioner, just as if this were an application for a transfer order pursuant to CPL 330.20 (11) in which petitioner was found to be "mentally ill” but not suffering from a "dangerous mental disorder”. The Commissioner is granted leave to pursue his application for a subsequent retention order, now to be deemed an application for a recommitment order, immediately upon the commencement of the period covered by the new order of conditions. In such application, the Commissioner may seek such provisional relief as he may be advised to request. Nothing herein is to be understood as passing upon petitioner’s mental condition after February 1988. Concur — Sullivan, J. P., Carro, Milonas, Rosenberger and Wallach, JJ.