Rose, J.P. Appeal from an order of the County Court of Cortland County (Campbell, J.), entered July 6, 2012, which granted defendant’s motion to suppress evidence.
Following a traffic stop, State Troopers found heroin in defendant’s vehicle and he was charged with criminal possession of a controlled substance in the third degree, criminal possession of a controlled substance in the seventh degree, driving while ability impaired by drugs and moving from lane unsafely. The Troopers testified at a Mapp hearing, and County Court concluded that defendant voluntarily consented to the search of his vehicle. Following a subsequent Huntley hearing, with testimony from the same witnesses, County Court concluded that defendant was in custody after having failed field sobriety tests and, no Miranda warnings having been given at that point, his subsequent statements were inadmissible. The court then revisited its prior decision and held that defendant’s consent to search the vehicle was involuntary and the heroin found in the vehicle was inadmissible. The People appeal.
County Court’s decision to suppress any statements made after defendant failed the field sobriety tests is erroneous as a matter of law. The evidence at the suppression hearings revealed that, after receiving a report of an erratic driver, two State Troopers observed defendant’s vehicle leave the roadway, travel onto the median and then return to the roadway. The Troopers received confirmation that the vehicle they observed was the subject of the report and they effected a traffic stop. Defendant stopped his vehicle and, in response to initial questioning, denied that he consumed any alcohol and claimed that his vehicle had hit a pothole, causing trouble with the alignment. One of the Troopers asked defendant to exit the vehicle and observed him to be unable to maintain his balance. Defendant unsuccessfully performed four of six field sobriety tests, but an Aleo-Sensor test was negative for the presence of *1306alcohol in his system. Believing defendant to be intoxicated by something other than alcohol, one of the Troopers testified that, at that point, he formed the unexpressed intention to arrest defendant. When the Troopers requested permission to search defendant’s vehicle, he responded affirmatively three separate times. The Troopers then opened the trunk and found a plastic bag containing what turned out to be heroin.
County Court articulated the appropriate standard for determining whether an interrogation is custodial, that is, would a reasonable person in defendant’s position but innocent of any crime have thought that he or she was in custody (see e.g. People v Rhodes, 83 AD3d 1287, 1288 [2011]). The court, however, overlooked the settled proposition that “[a] temporary roadside detention pursuant to a routine traffic stop is not custodial within the meaning of Miranda” (People v Mathis, 136 AD2d 746, 747 [1988], lv denied 71 NY2d 899 [1988], citing Berkemer v McCarty, 468 US 420 [1984]; see People v Kulk, 103 AD3d 1038, 1039 [2013]; People v Hasenflue, 252 AD2d 829, 830 [1998], lv denied 92 NY2d 982 [1998]). The facts here reveal a reasonable initial interrogation attendant to a roadside detention that was merely investigatory (see People v Harris, 186 AD2d 148, 148 [1992]; People v Mathis, 136 AD2d at 748). The Troopers’ inquiries, the mixed results of the field sobriety tests and a negative Aleo-Sensor test would not have caused a reasonable person innocent of any wrongdoing to believe that he or she was in custody (see People v Kulk, 103 AD3d at 1039; People v McAleavey, 159 AD2d 646, 646 [1990]; People v Brown, 104 AD2d 696, 697 [1984], lv denied 64 NY2d 778 [1985]). In our view, the Troopers’ observations of defendant’s condition justified the further detention for the limited purpose of investigating whether he was operating his motor vehicle in an impaired condition (see People v Hasenflue, 252 AD2d at 830; People v Noonan, 220 AD2d 811, 812-813 [1995]).
Although County Court relied upon People v Baez (95 AD3d 654 [2012], lv denied 19 NY3d 994 [2012]), the facts of that case are distinguishable. In Baez, the officer’s threat to arrest the occupants of the vehicle was expressly stated to them, creating a situation in which no reasonable person would have believed that he or she was free to leave (id. at 654-655). Here, on the other hand, the Troopers’ intention was not expressed to defendant and, therefore, it is irrelevant in determining whether defendant was in custody for purposes of Miranda (see People v Bell, 182 AD2d 858, 859 [1992], lv denied 80 NY2d 927 [1992]; People v Brown, 104 AD2d at 697).
Our conclusion renders academic County Court’s finding that, *1307because defendant was in custody, his consent to the search was involuntary. In any event, “ ‘[t]he voluntariness of a consent to search is not vitiated, per se, by the failure to give Miranda warnings to an accused while subject to custodial interrogation’ ” (People v McCray, 96 AD3d 1480, 1481 [2012], lv denied 19 NY3d 1104 [2012], quoting People v Tremblay, 77 AD2d 807, 807 [1980]). Here, the evidence supports County Court’s original conclusion that, based on the totality of circumstances, defendant’s consent to the search was voluntary (see People v Young, 86 AD3d 796, 797 [2011], lv denied 17 NY3d 905 [2011]; People v Quagliata, 53 AD3d 670, 672 [2008], lv denied 11 NY3d 834 [2008]; People v Leiva, 33 AD3d 1021, 1023 [2006]).
Spain, McCarthy and Egan Jr., JJ., concur. Ordered that the order is reversed, on the law, motion denied and matter remitted to the County Court of Cortland County for further proceedings not inconsistent with this Court’s decision.