Appeal from a judgment of the Oneida County Court (Barry M. Donalty, J.), rendered April 23, 2004. The judgment convicted the defendant, upon a jury verdict, of attempted rape in the first degree, attempted sexual abuse in the first degree and endangering the welfare of a child.
It is hereby ordered that the judgment so appealed from be and the same hereby is unanimously modified on the law by vacating the sentence imposed on attempted sexual abuse in the first degree and as modified the judgment is affirmed, and the matter is remitted to Oneida County Court for resentencing on count two of the indictment.
Memorandum: Defendant appeals from a judgment convicting him after a jury trial of attempted rape in the first degree (Penal Law §§ 110.00, 130.35 [1]), attempted sexual abuse in the first degree (§§ 110.00, 130.65 [1]), and endangering the welfare of a child (§ 260.10 [1]). We reject defendant’s contention that County Court erred in its Molineux ruling, pursuant to which the court allowed the People to introduce evidence of prior sexual contact between defendant and the victim. A central issue before the jury was whether defendant intended to rape the victim, and thus evidence of prior uncharged crimes concerning sexual contact with the victim was properly admitted (see generally People v Kocyla, 167 AD2d 938, 939 [1990]).
Contrary to defendant’s further contention, the sentence is not unduly harsh or severe. As the People correctly concede, however, the sentence imposed on the count of attempted sexual abuse in the first degree, i.e., a determinate sentence of imprisonment of four years, is illegal. Rather, defendant should have been sentenced pursuant to Penal Law § 70.00 (2) (e) and (3) to an indeterminate term of imprisonment with a maximum term not to exceed four years and a minimum of at least one year. We therefore modify the judgment by vacating the sentence *1162imposed on attempted sexual abuse in the first degree, and we remit the matter to County Court for resentencing on count two of the indictment. Present—Pigott, Jr., P.J., Scudder, Gorski, Martoche and Green, JJ.