*1134The appellant is a convicted recidivist sex offender. On February 11, 2009, prior to his scheduled release from prison, the State of New York commenced a proceeding pursuant to Mental Hygiene Law article 10 (hereinafter an article 10 proceeding), alleging that he suffered from a mental abnormality requiring civil commitment.
Prior to the trial, the appellant unsuccessfully sought to dismiss the petition by which the State commenced the article 10 proceeding on the ground, inter alia, that he was not a “detained sex offender” as defined by Mental Hygiene Law § 10.03 (g), because at the time the State commenced the article 10 proceeding he was incarcerated for his conviction of attempted promoting prison contraband in the first degree, rather than for a sex offense. The appellant also sought, prior to the trial, to preclude testimony or evidence from Dr. Katrina Colistra, a licensed psychologist employed by the New York State Office of Mental Health, on the ground, inter alia, that Dr. Colistra’s examination of the appellant was conducted in violation of his right to counsel. Dr. Colistra had examined the appellant on January 13, 2009, at the request of a case review team, to determine if he was suffering from a mental abnormality, and prior to the team’s recommendation to the Attorney General that he commence an article 10 proceeding seeking to place the appellant under civil management. The Supreme Court permitted Dr. Colistra to testify at the trial. At the close of evidence, *1135and over the appellant’s objection, the court granted the State’s motion pursuant to CPLR 4401 for judgment as a matter of law on the issue of whether he is a “detained sex offender.” The jury unanimously found that the appellant suffered from a mental abnormality that predisposed him to commit a sex offense. The court then conducted a dispositional hearing, at which additional evidence was offered (see Mental Hygiene Law § 10.07 [f]). At the conclusion of the dispositional hearing, the Supreme Court found that the appellant was a dangerous sex offender requiring civil confinement, and, accordingly, granted the petition and directed that he be committed to a secure treatment facility for care, treatment, and control until such time as he no longer requires confinement (see Mental Hygiene Law § 10.07 [f]).
The Supreme Court properly denied the appellant’s request to preclude Dr. Colistra’s testimony. In an article 10 proceeding, once a person is identified as a possible dangerous sex offender requiring confinement, he or she is referred to a case review team for evaluation (see Mental Hygiene Law § 10.05 [d]). The case review team may refer a person for a psychiatric evaluation to assist it in determining whether he or she requires civil management (see Mental Hygiene Law § 10.05 [e]). After such an examination, the case review team determines whether the person is in need of civil management (see Mental Hygiene Law § 10.05 [e]). The appellant’s right to counsel did not attach until this article 10 judicial proceeding was commenced against him. Since the evaluation was conducted prior to the commencement of the article 10 proceeding, the appellant was not entitled to have counsel present (see Mental Hygiene Law §§ 10.06 [c]; 10.08 [g]; Matter of State of New York v John P., 85 AD3d 1189 [2011], affd 20 NY3d 941 [2012]; Matter of State of New York v Pierce, 79 AD3d 1779 [2010]). Moreover, the court did not err in allowing Dr. Colistra and the State’s other psychiatric expert to testify as to details of the appellant’s sex offense history, “since the purpose of the testimony was to explain the basis for the experts’ opinions” (Matter of State of New York v Anonymous, 82 AD3d 1250, 1251 [2011]; see Mental Hygiene Law § 10.08 [b]; Matter of State of New York v Wilkes, 77 AD3d 1451, 1453 [2010]).
The Supreme Court also properly denied the appellant’s pretrial motion to dismiss the petition. The appellant correctly contends that Penal Law § 70.30 may not be used to aggregate terms of imprisonment in order to make “detained sex offender” determinations pursuant to article 10 (see Matter of State of New York v Rashid, 16 NY3d 1, 15-16 [2010]). Nonetheless, the *1136court properly determined that the appellant was a detained sex offender on the basis that, at the time the State commenced the instant article 10 proceeding, he was incarcerated for a “related offense,” because the appellant was convicted of attempted promoting prison contraband in the first degree, and sentenced thereon, while still incarcerated upon his underlying sex offense conviction, and there was no interruption in his incarceration between the terms imposed for his underlying sex offense conviction and the promoting prison contraband conviction (see Matter of State of New York v Rashid, 16 NY3d at 15; Matter of State of New York v Williams, 92 AD3d 1274, 1276 [2012]; State of New York v Maurice G., 32 Misc 3d 380, 386 [2011]).
The appellant contends that the Supreme Court improperly removed the question of whether he was a “detained sex offender” from the jury by directing the verdict on this issue. Pursuant to Mental Hygiene Law § 10.07 (a), within 60 days of a court determining that there is probable cause that an article 10 respondent is a “sex offender requiring civil management, the court shall conduct a jury trial to determine whether the respondent is a detained sex offender who suffers from a mental abnormality.” However, the Mental Hygiene Law also provides that “[t]he respondent’s commission of a sex offense shall be deemed established and shall not be relitigated at the trial, whenever it is shown that . . . the respondent stands convicted of such offense” (Mental Hygiene Law § 10.07 [c]). Here, the appellant’s status as a sex offender was properly deemed established upon proof of his conviction of two counts of sodomy in the second degree, which is, by definition, a “sex offense” (see Mental Hygiene Law § 10.03 [p] [1]). The State established through the admission of certified records, and it was undisputed, that the appellant was previously convicted of two counts of sodomy in the second degree, a class D felony, that he was subsequently convicted of attempted promoting prison contraband in the first degree while still serving a term of incarceration for the sodomy conviction, and that he was “in the care, custody, control, or supervision of an agency with jurisdiction, with respect to a sex offense,” as he was “convicted of a sex offense . . . serving a sentence for . . . such offense or for a related offense” (Mental Hygiene Law § 10.03 [g] [1]). Accordingly, under these circumstances, the Supreme Court properly granted the State’s motion pursuant to CPLR 4401 for judgment as a matter of law on the issue of whether the appellant was a “detained sex offender” (Mental Hygiene Law § 10.03 [g]; see Matter of State of New York v Rashid, 16 NY3d 1, 7 n 3 [2010]; Matter of State of New York v Geoffrey R, 100 AD3d 911 [2012]).
*1137Despite the appellant’s contentions to the contrary, the State established that he suffered from a mental abnormality by legally sufficient evidence, “since there was a valid line of reasoning by which the jury could conclude that the appellant suffered from a mental abnormality based on the evidence presented at trial” (Matter of State of New York v Anonymous, 82 AD3d at 1251; see Matter of State of New York v Derrick B., 68 AD3d 1124, 1126 [2009]). Moreover, because the jury’s verdict was supported by a fair interpretation of the evidence, it was not contrary to the weight of the evidence (see Mental Hygiene Law §§ 10.03 [i]; 10.07 [a]; Matter of State of New York v Anonymous, 82 AD3d at 1251; Matter of State of New York v Derrick B., 68 AD3d at 1126).
The Supreme Court’s finding that the State established that the appellant’s mental abnormality involves such a strong predisposition to commit sex offenses and such an inability to control his behavior that he is likely to be a danger to others and to commit sex offenses if not confined to a secure treatment facility, and its concomitant determination that the appellant is a dangerous sex offender requiring confinement, is supported by clear and convincing evidence (see Mental Hygiene Law § 10.07 [f]; Matter of State of New York v Anonymous, 82 AD3d at 1252).
The appellant’s remaining contentions are without merit. Dillon, J.P., Balkin, Chambers and Miller, JJ., concur.