The act of committing a crime is inherently linked to its occurrence, and it suffices for the presence of a witness that they have personally observed its commission or perceived it through one of their senses, provided that this perception is certain and leaves no room for doubt. This enables the officer who has witnessed the crime to apprehend anyone against whom evidence of participation exists and to conduct a search without the need for authorization from the public prosecution. While the assessment of the circumstances pertaining to the crime at the time of its commission and the sufficiency thereof to establish a state of flagrance is entrusted to the trial court, this is conditional upon the reasons and considerations upon which the court based its assessment being valid and leading to the conclusion reached. When examining this matter, the mere observation by the officer of pharmaceutical pills located beneath the seat next to the driver during a traffic stop to clarify the status of the driver and enforce traffic laws, without confirming the type or content of these pills, does not fulfill the conditions of flagrance as defined in Article 30 of the Criminal Procedure Law. Furthermore, the court’s description of the case and the summary of the officer’s statements do not indicate that the officer identified the nature of the substance or the content of the pharmaceutical pills before apprehending the defendants and searching them, as he reached into the car without the driver’s consent and lacking legal grounds. Therefore, this situation does not constitute a case of flagrance that would allow the law enforcement officer to arrest the suspect and conduct a search, as merely viewing the pharmaceutical pills does not equate to certainty that they contain narcotic substances. Consequently, the officer is not faced with a flagrant crime, particularly as the defendants did not voluntarily relinquish the pharmaceutical pills, nor did they authorize the officer to ascertain their nature, rendering his arrest and search unjustified and unsupported by law.