Justice WALLACE, JR.
delivered the opinion of the Court.
Defendant was convicted of selling cocaine in a school zone. The Appellate Division rejected defendant’s claim that the police violated his constitutional rights when they asked him a question without first giving him Miranda1 warnings, but found that defendant established a prima facie claim of ineffective assistance of counsel for defense counsel’s failure to file a motion to suppress the cocaine. The panel remanded for a hearing on the Fourth Amendment suppression motion, but held that if the trial court denied the motion, the conviction and sentence would be affirmed. Defendant filed a petition for certification, and the State filed a cross-petition. We granted both petitions. We now hold that, based on the observations made by the law enforcement officers, there was probable cause to search and arrest defendant. We also hold that the police officer’s question to defendant that elicited defendant’s response without prior Miranda warnings violated Miranda, but was harmless under the circumstances. We reverse and remand to reinstate the judgment of conviction and sentence.
I.
At approximately 7.T5 p.m. on August 28, 2002, Newark Police Officers Patrick Cantalupo and Bobby Bullock, riding in an unmarked police ear and wearing plainclothes, were patrolling a high-crime area near Lincoln Park. They observed defendant Rahmil O’Neal and another man standing in front of a restaurant. The man gave money to defendant in exchange for an unknown [607]*607object. Cantalupo believed that a drug transaction had taken place and decided to investigate further. He turned the car around and parked across the street from defendant’s location.
Several minutes later, Cantalupo and Bullock watched as a second man approached and engaged in conversation with defendant. The man handed cash to defendant and defendant knelt down on his left knee. Defendant then reached in his right sock, removed a clear plastic bag containing black-capped vials that the officers suspected were filled with cocaine, and handed a vial to the man. Cantalupo and Bullock immediately exited the car to approach the two men. Although they were in plainclothes, the police officers wore badges around their necks and announced their presence. The unknown male retreated into a doorway adjacent to the restaurant and locked the metal door. When the police officers were unable to open the metal door, they turned their focus to defendant, who was pretending to use a nearby pay phone.
Cantalupo asked defendant, “what’s going on?” Defendant responded that he did nothing wrong. Bullock directed Cantalupo to check the bulge around defendant’s right ankle. Cantalupo patted the area, felt the bulge, and asked defendant what was in his sock. Defendant admitted it was cocaine. Cantalupo then searched defendant and retrieved a clear plastic sandwich-sized bag containing forty-nine black-capped vials of cocaine from the area of defendant’s right ankle. The officer placed defendant under arrest. A more thorough search of defendant revealed thirteen dollars in his pocket.
Defendant was charged with third-degree possession of cocaine, N.J.S.A 2C:35-10a(l); third-degree possession of cocaine with intent to distribute, N.J.S.A 2C:35-5a(l) and —5b(3); and third-degree possession of cocaine within 1000 feet of school property, N.J.S.A 2C:35-7. Defendant filed a motion to suppress the drugs, but later withdrew that motion in a pretrial memorandum that was executed by defendant, his counsel, the assistant prosecutor, and the trial court.
[608]*608On the first day of trial, defense counsel advised the trial court that a hearing was not required to determine the admissibility of defendant’s statement to the police that he had cocaine in his possession. The following day, defense counsel changed his position and requested that the trial court hold a hearing to consider suppressing defendant’s incriminating statement made in response to the police’s inquiry regarding the bulge on his right ankle. Counsel claimed that the statement was elicited from defendant without Miranda warnings and should be suppressed. The trial court granted the request to hold a hearing.
Cantalupo was the sole witness at the hearing. He testified that he observed defendant distribute drugs on two occasions, and that during the second he saw defendant remove a vial of suspected cocaine from his sock and give it to an unknown man in exchange for money. After he and Bullock approached defendant, Cantalupo explained that Bullock advised him to cheek the bulge on defendant’s right ankle. The following exchange between the prosecutor and Cantalupo then took place:
Q. How did you respond?
A. Oh, not knowing if it could be a weapon, it could be anything as far as a Terry frisk goes. I immediately patted the area and I — I asked, you know, what’s this?
Q. And what did he say?
A. And that’s when he responded, a bag of cocaine.
Q. And did you recover the bag?
A. Absolutely.
Q. Okay. And where did the bag turn — turn on top? Did the bag have anything inside of it?
A. Yes. It was a clear plastic bag, almost like a sandwich bag size with 49 black capped vials of cocaine or I, at the time, suspected cocaine.
On cross-examination, defense counsel asked Cantalupo if, based on the two transactions he observed, probable cause existed to arrest defendant. Cantalupo replied that he thought he “had enough suspicion to approach” defendant. On re-direct, the prosecutor asked Cantalupo if he was able to see what was in the bag when defendant knelt down on his knee. Cantalupo replied, “several black capped vials ... [s]uspected cocaine.” When the prosecutor asked Cantalupo if the cocaine alone gave him probable [609]*609cause to place defendant under arrest, Cantalupo replied, “[correct.” Cantalupo agreed that when he approached defendant “he was basically going to ... placet ] [defendant] under arrest.” On re-cross-examination, Cantalupo acknowledged that he did not read defendant his Miranda rights prior to asking defendant what was in his sock.
Defense counsel argued that defendant was in custody and any statement by defendant must be suppressed because the police failed to provide him with Miranda warnings prior to asking him what was in his sock. Focusing on whether defendant was in custody when he made the incriminating statement, the trial court explained that “the issue still is what a reasonable person, innocent of crime in the defendant’s position, would have thought.” The trial court found that “a reasonable person, innocent of crime, would not have thought ... that it was a custodial interrogation, that he was in custody,” and therefore Miranda warnings were not required. The trial court denied defendant’s motion to suppress his statement.
Before the jury, Cantalupo and Bullock testified consistent with the testimony Cantalupo presented at the Miranda hearing. The State also called Detective Reginald Holloway of the Bureau of Narcotics of the Essex County Sheriffs Department as an expert witness in the area of street-level narcotics. Holloway opined that each of the transactions witnessed by Cantalupo and Bullock was an illegal hand-to-hand narcotics transaction. He also opined that the forty-nine vials of cocaine recovered from defendant “would be possessed for the intent to further distribute for monetary gain[.]”
After the trial court denied defendant’s motion for judgment of acquittal, defendant testified on his own behalf. Defendant denied he had any drugs on him when he was arrested and denied that he ever told the police that the bag of cocaine belonged to him. Defendant claimed he was on his way to visit a friend when he stopped to shake hands with a man who was standing in front of a restaurant at 77 Lincoln Park. Defendant said that the man ran into an adjacent building when the police appeared. Defendant [610]*610surmised that the cocaine the police found must have belonged to the other man because that man ran when the police approached.
The jury convicted defendant on each count. After merger, the trial court sentenced defendant to a four-year custodial term with three years of parole ineligibility. Defendant appealed. In an unpublished decision, the Appellate Division held that defendant’s initial detention was an investigatory stop and that Miranda warnings were not required. However, the panel found merit in defendant’s claim that he received ineffective assistance of counsel when defense counsel failed to file a motion to suppress the cocaine.2 Because the State never had the opportunity to justify the search, the panel remanded for a hearing on the motion to suppress. The panel concluded that if the trial court subsequently granted defendant’s motion to suppress the drugs, the judgment of conviction would be vacated, but if the court denied the motion, defendant’s conviction and sentence would be affirmed. The panel also rejected defendant’s challenge to his sentence.
Defendant filed a petition for certification, and the State filed a cross-petition. We granted both petitions. 186 N.J. 256, 893 A.2d 722 (2006).
H.
Defendant argues that the seizure of the drugs during the pat-down search violated his constitutional rights and that his statement to the police must be suppressed because it was elicited after he was in custody and prior to his receipt of Miranda warnings. As a result of his counsel’s failure to seek to suppress the drugs that were allegedly seized in violation of the federal and state constitutions, defendant further contends that he was denied the effective assistance of trial counsel. Finally, defendant contends that his sentence was excessive.
[611]*611The State counters that the drugs seized from defendant are admissible either as the result of a valid investigatory stop or as a search incident to an arrest based on probable cause. The State argues that defendant was not in custody at the time he told the police he had cocaine, and therefore, Miranda warnings were not required. Further, the State urges that the Appellate Division erred in looking to the subjective intent of the police rather than applying an objective test to determine whether the seizure of the drugs from defendant was reasonable. The State also contends that the Appellate Division erred when it determined that defendant’s trial counsel was ineffective for failing to file a motion to suppress and when it remanded for a hearing on that issue.
III.
A.
Before addressing defendant’s claim that the police violated his constitutional rights when they failed to give him Miranda warnings prior to questioning him about the bulge in his right sock, we must first decide whether defendant’s stop was an investigatory stop or was a search and arrest based on probable cause. Because no warrant was sought for the search and arrest of defendant, the State bears the burden of showing that the warrantless seizure “ ‘falls within one of the few well-delineated exceptions to the warrant requirement.’ ” State v. Maryland, 167 N.J. 471, 482, 771 A.2d 1220 (2001) (quoting State v. Citarella, 154 N.J. 272, 278, 712 A.2d 1096 (1998), and citing Schneckloth v. Bustamonte, 412 U.S. 218, 219, 93 S.Ct. 2041, 2043, 36 L.Ed.2d 854, 858 (1973)). The State has the burden of proof to demonstrate by a preponderance of the evidence that the warrantless seizure was valid. State v. Pineiro, 181 N.J. 13, 20, 853 A.2d 887 (2004).
The two constitutionally permissible forms of police encounters that we need consider in this case are the investigatory [612]*612stop, referred to as a Terry3 stop, and the stop occasioned by probable cause. The standard for a Terry stop “is lower than the standard of probable cause necessary to justify an arrest.” State v. Nishina, 175 N.J. 502, 511, 816 A.2d 153 (2003). The police may conduct a Terry stop if the “specific and articulable facts which, taken together with rational inferences from those facts, give rise to a reasonable suspicion of criminal activity.” Ibid. (citation and internal quotation marks omitted). That is, “would the facts available to the officer at the moment of the seizure or the search [justify a person] of reasonable caution in the belief that the action taken was appropriate?” Terry, supra, 392 U.S. at 21-22, 88 S.Ct. at 1880, 20 L.Ed.2d at 906 (citations and internal quotation marks omitted).
The second encounter we need consider is one based on the probable cause standard. In State v. Moore, we described that standard as follows:
The probable cause standard is a well-grounded suspicion that a crime has been or is being committed. Probable cause exists where the facts and circumstances within ... [the officers’] knowledge and of which they had reasonably trustworthy information [are] sufficient in themselves to warrant a [person] of reasonable caution in the belief that an offense has been or is being committed. The substance of all the definitions of probable cause is a reasonable ground for belief of guilt.
[181 N.J. 40, 45-46, 853 A.2d 903 (2004) (alterations in original) (citations and internal quotation marks omitted).]
The totality of the circumstances must be considered in determining whether there is probable cause. Id. at 46, 853 A.2d 903. In short, the court must “make a practical, common sense determination whether, given all of the circumstances, ‘there is a fair probability that contraband or evidence of a crime will be found in a particular place.’ ” Ibid, (quoting Illinois v. Gates, 462 U.S. 213, 238, 103 S.Ct. 2317, 2332, 76 L.Ed.2d 527, 548 (1983)).
[613]*613B.
Applying those principles to the present case, we conclude the police had probable cause to arrest defendant. As noted, Officers Bullock and Cantalupo observed a suspected drug transaction in a high-crime area before they moved to a closer position and watched defendant engage in a second drug transaction. They saw defendant remove a clear plastic bag containing black-capped vials of suspected cocaine from the right ankle of his pants and hand a vial to a man in exchange for money. The police, having observed at least one and possibly two drug transactions, had reasonable grounds to believe that defendant had committed a criminal offense.
We reached a similar conclusion with less compelling facts in Moore. In that case, the police observed a group of men in a high-crime area. Id. at 43, 853 A.2d 903. At one point, the defendant and another man left the group and walked over to the rear of a delicatessen where they met with a third person. Ibid. The defendant and his companion handed currency to the third person and received a small item in exchange. Ibid. We held that the “observations by the law enforcement officers in the high-crime area supported probable cause to arrest defendant, search him, and seize the suspected drugs incident to that arrest.” Id. at 47, 853 A.2d 903.
The State urges that the Appellate Division misinterpreted our law in ruling that the evidence did not justify a search incident to arrest because the police did not have the subjective intent to arrest defendant. The State argues that it is not the subjective intent or state of mind of the officers, but rather, whether the seizure of defendant by the officers was objectively reasonable. We agree that the standard is an objective one.
Recently, the United States Supreme Court commented on the relevance of a police officer’s subjective motivations. The Court explained that: “Our cases have repeatedly rejected this approach. An action is ‘reasonable’ under the Fourth Amend[614]*614ment, regardless of the individual officer’s state of mind, ‘as long as the circumstances, viewed objectively, justify [the] action.’ The officer’s subjective motivation is irrelevant.” Brigham City v. Stuart, — U.S.-,-, 126 S.Ct. 1943, 1948, 164 L.Ed.2d 650, 658 (2006) (alteration in original) (citations omitted). Moreover, we have explained that “the proper inquiry for determining the constitutionality of a search-and-seizure is whether the conduct of the law enforcement officer who undertook the search was objectively reasonable, without regard to his or her underlying motives or intent.” State v. Bruzzese, 94 N.J. 210, 219, 463 A.2d 320 (1983) , cert. denied, 465 U.S. 1030, 104 S.Ct. 1295, 79 L.Ed.2d 695 (1984) . Although an officer may testify to his or her subjective intent, the crucial inquiry is whether the officer’s conduct was objectively reasonable.
In the present case, the record is sufficient to decide the Fourth Amendment issues. We agree with the State’s alternative argument that based on the totality of the circumstances, when viewed objectively, Bullock and Cantalupo had probable cause to search and arrest defendant. After the police stopped defendant, they could have immediately placed him under arrest, searched him, and seized the bag of drugs as a search incident to a lawful arrest. See State v. Eckel, 185 N.J. 523, 530, 888 A.2d 1266 (2006) (citing Chimel v. California, 395 U.S. 752, 762-63, 89 S.Ct. 2034, 2040, 23 L.Ed.2d 685, 694 (1969)). The fact that the police searched and removed the drugs before placing defendant under arrest does not alter the outcome. When the police search an individual before placing him under arrest “as part of a single uninterrupted transaction, it does not matter whether the arrest precedes the search.” State v. Bell, 195 N.J.Super. 49, 58, 477 A.2d 1272 (1984) (citing State v. Doyle, 42 N.J. 334, 343, 200 A.2d 606 (1964)). It is the “right to arrest,” rather than the actual arrest that “must pre-exist the search.” Doyle, supra, 42 N.J. at 342, 200 A.2d 606. As long as the right to arrest pre-existed the search, and the “arrest is valid independently of, and is not made to depend on, the search or its result,” the search will not be [615]*615invalidated “simply because in precise point of time the arrest does not precede the search.” Id. at 343, 200 A.2d 606; see also Rawlings v. Kentucky, 448 U.S. 98, 111, 100 S.Ct. 2556, 2564, 65 L.Ed.2d 633, 645-46 (1980) (“Where the formal arrest followed quickly on the heels of the challenged search ..., we do not believe it particularly important that the search preceded the arrest rather than vice versa.”); Moore, supra, 181 N.J. at 47, 853 A.2d 903 (holding that search and seizure incident to arrest was proper because probable cause existed after police observed drug transaction in high-crime area). We conclude that the police had probable cause to arrest defendant for a drug offense, and the seizure of the drugs during the search that preceded the arrest was lawful.
IV.
We turn now to defendant’s contention that his oral statement to the police during the pat down was in violation of his Miranda rights. Specifically, defendant argues that it was a violation of his rights for the police to ask him an accusatory question while in custody and prior to being administered Miranda warnings.
In general, Miranda “warnings must be given before a suspect’s statement made during custodial interrogation [may] be admitted in evidence.” Dickerson v. United States, 530 U.S. 428, 431-32, 120 S.Ct. 2326, 2329, 147 L.Ed.2d 405, 412 (2000). In Miranda, supra, the Court defined “custodial interrogation” as questioning initiated by law enforcement “after a person has been taken into custody or otherwise deprived of his freedom of action in any significant way.” 384 U.S. at 444, 86 S.Ct. at 1612, 16 L.Ed.2d at 706. The determination whether a suspect is in “custody depends on the objective circumstances of the interrogation, not on the subjective views harbored by either the interrogating officers or the person being questioned.” Stansbury v. California, 511 U.S. 318, 323, 114 S.Ct. 1526, 1529, 128 L.Ed.2d 293, [616]*616298 (1994). That is, a police officer’s “unarticulated plan has no bearing on the question whether a suspect was ‘in custody1 at a particular time; the only relevant inquiry is how a reasonable [person] in the suspect’s position would have understood his situation.” Berkemer v. McCarty, 468 U.S. 420, 442, 104 S.Ct. 3138, 3151, 82 L.Ed.2d 317, 336 (1984) (footnote omitted); see State v. P.Z., 152 N.J. 86, 103, 703 A.2d 901 (1997) (noting that “critical determinant of custody is whether there has been a significant deprivation of the suspect’s freedom of action based on the objective circumstances, including the time and place of the interrogation, the status of the interrogator, the status of the suspect, and other such factors”) (citations omitted).
As noted above, based on the observations of the police, a reasonable police officer would have believed he or she had probable cause to arrest defendant for a drug transaction and would not have permitted defendant to leave. Similarly, a reasonable person in defendant’s position, based on the nature of the police encounter, would not have believed that he was free to leave. We conclude that defendant was in custody when Cantalupo asked him, prior to administering Miranda warnings, what was in his sock. Consequently, defendant’s reply that he had cocaine in his sock should have been suppressed.
Nevertheless, we are satisfied that the failure to suppress defendant’s admission was harmless beyond a reasonable doubt. The police had probable cause to search and arrest defendant prior to asking the offending question and would have discovered the cocaine when they searched the sock. The fact that defendant told the police what they were about to discover had no bearing on the legality of the seizure of the cocaine. Consequently, the failure to suppress defendant’s admission that he had cocaine in his sock was harmless. See R. 2:10-2.
B.
This case presents an opportunity to provide guidance concerning the safety exception to Miranda. That exception is [617]*617based on the “objectively reasonable need to protect the police or the public from any immediate danger associated with the weapon.” New York v. Quarles, 467 US. 649, 659 n. 8, 104 S.Ct. 2626, 2633, 81 L.Ed.2d 550, 559 (1984). It is a narrow exception that “will be circumscribed by the exigency which justifies it.” Id. at 658, 104 S.Ct. at 2633, 81 L.Ed.2d at 559. Moreover, the United States Supreme Court expressed that “police officers can and will distinguish almost instinctively between questions necessary to secure their own safety or the safety of the public and questions designed solely to elicit testimonial evidence from a suspect.” Id. at 658-59, 104 S.Ct. at 2633, 81 L.Ed.2d at 559.
Although we recently applied the principles of Quarles in finding an emergency-aid exception to Miranda, see State v. Boretsky, 186 N.J. 271, 283, 894 A.2d 659 (2006), we have not previously considered the application of a safety exception in a case like the present one. Other jurisdictions have applied a safety exception to Miranda.
In United States v. Shea, 150 F.3d 44 (1st Cir.), cert. denied, 525 US. 1030, 119 S.Ct. 568, 142 L.Ed.2d 473 (1998), the police arrested the defendant for his suspected role in an attempted robbery. Id. at 47. Prior to giving Miranda warnings to the defendant, one of the police officers asked the defendant if he had any weapons or needles on him that could harm the officer. Id. at 48. The trial court permitted the question and answer at trial. Ibid. On appeal, the United States Court of Appeals for the First Circuit affirmed, concluding that the safety exception to Miranda applied. Ibid.; see also United States v. Carrillo, 16 F.3d 1046, 1049-50 (9th Cir.1994) (finding question by police whether defendant had needles on his person was within safety exception); United States v. Edwards, 885 F.2d 377, 384 (7th Cir.1989) (approving police officer’s question whether drug dealer had weapon without first giving Miranda warnings); State v. Stephenson, 350 N.J.Super. 517, 796 A.2d 274 (App.Div.2002) (noting that safety exception to Miranda may apply when there is a compelling and exigent need to protect public or police).
[618]*618We conclude that in limited circumstances, based on an “objectively reasonable need to protect the police or the public from any immediate danger associated with the weapon[,]” a safety exception to Miranda is appropriate. Quarles, supra, 467 U.S. at 659 n. 8, 104 S.Ct. at 2633, 81 L.Ed.2d at 559. In such circumstances, the police must specifically frame the question to elicit, a response concerning the possible presence of a weapon.
Although the safety exception to Miranda was not raised by the State, if it had been raised, we would reject its applicability in this matter. The question asked by the police in referencing the bulge in defendant’s sock was “what’s this?” That question was not narrowly tailored to prompt a response concerning the possible presence of a weapon or aimed at protecting the safety of the police.
V.
We turn next to the State’s claim that it was error for the Appellate Division to entertain defendant’s ineffective assistance of counsel claim and to remand for a suppression hearing. Before the Appellate Division, defendant argued that his trial counsel was ineffective for failing to file a motion to suppress the seizure of the drugs. The State argued that pursuant to Rule 3:5 — 7(f), if a motion to suppress is not timely made, the right to file the motion is considered waived. R. 3:5 — 7(f) (“If a timely motion [to suppress] is not made in accordance with this rule, the defendant shall be deemed. to have waived any objection during trial to the admission of evidence on the ground that such evidence was unlawfully obtained.”).
In order to satisfy the Strickland4 standard when an ineffective assistánce of counsel claim is based on the failure to file a suppression motion, a defendant must establish “that his Fourth [619]*619Amendment claim is meritorious.” State v. Fisher, 156 N.J. 494, 501, 721 A.2d 291 (1998). Because we conclude that the police had probable cause to arrest and search defendant, there is no merit to defendant’s Fourth Amendment claim. Simply stated, a motion to suppress the drugs found on defendant would have failed. It is not ineffective assistance of counsel for defense counsel not to file a meritless motion, or as in this case, to waive the hearing on the motion to suppress. Consequently, we need not address defendant’s ineffective assistance of counsel argument or the-State’s claim that defendant is procedurally barred from raising his motion to suppress.
VI.
Finally, we find no merit to defendant’s argument that his four-year, mid-range sentence was excessive.
VII.
The judgment of the Appellate Division is reversed. We remand to reinstate the judgment of conviction and sentence.