*1103Appeal from a judgment (denominated order) of the Supreme Court, Cayuga County (Peter E. Corning, A.J.), entered December 17, 2003. The judgment granted respondent’s motion to dismiss the petition for a writ of habeas corpus.
It is hereby ordered that the judgment so appealed from be and the same hereby is unanimously affirmed without costs.
Memorandum: Supreme Court properly dismissed the petition seeking a writ of habeas corpus. Where, as here, the issues raised in the petition were, or could have been, raised on a direct appeal or by a CPL article 440 motion, habeas corpus is not a proper remedy (see People ex rel. Spencer v Burge, 307 AD2d 772, 773 [2003]; see also People ex rel. Abdullah v Walker, 199 AD2d 1074 [1993], lv denied 83 NY2d 752 [1994]). Further, assuming, arguendo, that the allegations raised in the petition with respect to irregularities or defects in petitioner’s order of commitment are true, we nevertheless conclude that petitioner would not be entitled to immediate release because there is a valid judgment of conviction underlying the commitment, and thus habeas corpus relief is not appropriate (see People ex rel. Burr v Clark, 278 AD2d 938 [2000], lv denied 96 NY2d 707 [2001]; see also People ex rel. Harris v Lindsay, 21 AD2d 102, 106 [1964], affd 15 NY2d 751 [1965]). Present—Pigott, Jr., RJ., Pine, Scudder, Martoche and Lawton, JJ.