Appeal by the defendant from an order of the Supreme Court, Queens County (Camacho, J), dated August 16, 2011, which denied, without a hearing, his motion to be resentenced pursuant to CPL 440.46 on his conviction of criminal sale of a con*665trolled substance in the third degree, which sentence was previously imposed, upon a jury verdict, on March 7, 2001.
Ordered that the order is reversed, on the law, and the matter is remitted to the Supreme Court, Queens County, for a new determination of the defendant’s motion, in accordance herewith.
CPL 440.46 (3), provides, in pertinent part, that “[t]he provisions of section twenty-three of chapter seven hundred thirty-eight of the laws of two thousand four shall govern the proceedings on and determination of a motion brought pursuant to this section.” Section 23 of chapter 738 of the Laws of 2004 states, in pertinent part: “The court shall offer an opportunity for a hearing and bring the applicant before it. The court may also conduct a hearing, if necessary, to determine . . . any controverted issue of fact relevant to the issue of sentencing.” The defendant’s presence is not required where the court determines as a matter of law that a defendant is not entitled to relief pursuant to CPL 440.46 (see People v Allen, 105 AD3d 969 [2013]). However, here, the People conceded that the defendant met the statutory requirements for relief pursuant to CPL 440.46, and the question before the Supreme Court was whether substantial justice dictated that the motion should be denied. Thus, the defendant was entitled to appear before the court and to be given an opportunity to be heard (see id.).
Here, although the defendant was brought before the Supreme Court, a decision denying the defendant’s motion had already been issued on the parties’ written submissions and the defendant was denied an opportunity to address the court. Indeed, the justice presiding on the appearance date was not the same justice who had received the written submissions and authored the decision denying the defendant’s motion. Thus, the defendant was effectively denied an opportunity to be heard (see People v Allen, 105 AD3d 969 [2013]; People v Irvin, 96 AD3d 1453 [2012]; People v Murray, 89 AD3d 567, 569 [2011]; cf. People v Lopez, 103 AD3d 460 [2013], lv denied 21 NY3d 945 [2013]; People v Morales, 46 AD3d 1395 [2007]; People v Soler, 45 AD3d 499 [2007]; People v Robinson, 45 AD3d 442, 442-443 [2007]; People v Burgos, 44 AD3d 387 [2007]). Accordingly, the order appealed from must be reversed, and the matter remitted to the Supreme Court, Queens County, for a new determination of the defendant’s motion, to be made after affording him an opportunity to appear before the court, and, if necessary, conducting a hearing (see People v Allen, 105 AD3d 969 [2013]). Mastro, J.P, Hall, Lott and Sgroi, JJ., concur.