
346 So.2d 1071 (1977)
The STATE of Florida, Petitioner,
v.
Edward SAWYER, Respondent.
No. 77-374.
District Court of Appeal of Florida, Third District.
June 7, 1977.
Stuart L. Simon, County Atty. and H.T. Smith and Richard M. Dunn, Asst. County Attys., for petitioner.
Bennett H. Brummer, Public Defender and Elliott H. Scherker, Asst. Public Defender, for respondent.
*1072 Before BARKDULL, HAVERFIELD and NATHAN, JJ.
PER CURIAM.
Petitioner, prosecutor in the trial court and appellee in the circuit court, seeks review (by certiorari) of an order of the circuit court, sitting in its appellate capacity, which held Section 21-31.1(b)(2) of the Code of Metropolitan Dade County [a loitering ordinance] to be unconstitutional and reversed the respondent's conviction for violation of said ordinance.
During the evening hours of October 9, 1975, officers of the City of Miami Police Department set up a stakeout to surveil narcotics activity around a pool hall in the City of Miami. The pool hall under surveillance was known to the police as a place where narcotics were sold, both inside and outside. During the narcotics stakeout, respondent Sawyer was observed standing in front of the pool hall with a man known to the police as "Roach". Respondent was also seen with Howard Wilamenko and Reginald Washington. "Roach", Wilamenko, and Washington were all suspected by the police as being narcotics dealers. The police observed approximately six drug transactions in front of the pool hall. On each drug transaction, an unidentified buyer would walk up to either "Roach", Wilamenko or Washington and start conversing. The respondent was next to each alleged drug dealer when each buyer was talking to the dealer. The unidentified buyer was observed passing money to the dealer, and the dealer would pass a tinfoil packet to the buyer.
One of the officers testified that he knew from previous experience that tinfoil packets usually are used for decks of heroin, and he had seen packets at least 55 times. The respondent was seen next to each dealer while they participated in each narcotic sale. On one such sale, a female in an orange Volkswagon took the object that the dealer gave to her, put it up to her nose, sniffed it, closed it, and put the rest in her brassiere.
The respondent was charged with the crime of knowingly loitering in a place where narcotics are used or possessed, in violation of Section 21-31.1(b)(2) of the Code of Metropolitan Dade County. During the trial in the Metropolitan Court, the defendant-respondent moved to dismiss the charge, contending that the loitering statute was unfair and overly broad and, therefore, unconstitutional. The motion to dismiss was denied; the defendant was convicted. Upon appeal, the conviction was reversed by the trial court, sitting in its appellate capacity, the circuit judge holding the loitering ordinance unconstitutional, and bottomed his opinion upon the dissenting opinion in Commonwealth v. Tirella, 356 Mass. 271, 249 N.E.2d 573 (1969). This certiorari proceeding followed, the petitioner contending that the circuit court, in its appellate capacity, departed from essential requirements of the law. We agree.
In construing an ordinance, the courts must assume that the legislative body intended a valid ordinance. State v. Tampa Water Works Company, 56 Fla. 858, 47 So. 358 (1908). If possible, a challenged ordinance should be construed as legal. State v. Brogden, 84 Fla. 520, 94 So. 653 (1922); Bentley-Gray Dry Goods Company v. City of Tampa, 137 Fla. 641, 188 So. 758 (1939). The courts should be very cautious in declaring a municipal ordinance unreasonable, there being a peculiar propriety in permitting the inhabitants of a city, through its officials, to determine what rules are necessary for their own local government. State v. McCarthy, 126 Fla. 433, 171 So. 314 (1936).
Section 21-31.1(b)(2) of the Code of Metropolitan Dade County, which is commonly referred to as Dade County's loitering ordinance, reads in part as follows:
"For the purpose of this Section `loitering' means the act of standing or remaining in or about any public street, public sidewalk, public overpass, or public bridge, or other place specifically enumerated herein.
"A person commits the offense of loitering when he knowingly loiters in any *1073 place with one or more persons knowing that a narcotic or dangerous drug, as detailed in Sections 893.01 and 893.15, Florida Statutes, is being unlawfully used or possessed." [emphasis added]
Under the provisions of Dade County's loitering ordinance, the elements of the offense are: (1) that the respondent knowingly loitered in a place with one or more individuals; (2) that narcotics or dangerous drugs were being unlawfully used or possessed; and (3) that the respondent had knowledge of the fact that narcotics or dangerous drugs were being unlawfully used or possessed.
Petitioner asserts that in holding Dade County's loitering ordinance facially over-broad, the circuit court rejected the case law and the principles of constitutional construction of the State of Florida while choosing to adopt the dissenting opinion in a 1969 Massachusetts case. See: Commonwealth v. Tirella, supra, 249 N.E.2d pages 577-578. Florida appellate courts have dealt with the issue of whether or not a loitering law was over-broad on several occasions. See: Jolley v. City of Jacksonville, 281 So.2d 901 (Fla. 1st D.C.A. 1973); State v. Ecker, 311 So.2d 104 (Fla. 1975); Ciccarelli v. City of Key West, 321 So.2d 472 (Fla. 3rd D.C.A. 1975). In Jolley v. City of Jacksonville, supra, the First District had under review a municipal ordinance prohibiting one's presence in a place with knowledge that narcotics were being used. The ordinance reads in part as follows:
"* * * Visiting or being present in any room, vehicle, or other place where any narcotic drug, barbiturate, central nervous system stimulant or hallucinogenic drug is being unlawfully injected, smoked, swallowed, taken or consumed with the knowledge that such activity is occurring."
The First District ruled that Jacksonville's ordinance did not violate one's freedom to associate and thus was not over-broad. The court went on to state:
* * * * * *
"In our view, it is perfectly legitimate for a legislative body to enact statutes or ordinance which have as their purpose and goal a prevention of the practice of visiting or being in a place where narcotics are knowingly used unlawfully.
"When construed and applied in the manner herein discussed, the ordinance is a valid exercise of governmental authority."
* * * * * *
The circuit court, in its order of reversal, attempts to distinguish Jolley v. City of Jacksonville, supra, on two grounds: First, the court reasoned that the Jacksonville ordinance required narcotic "activity" rather than mere possession. Second, the court asserted that the Jacksonville ordinance deals with attendance at a place, whereas the Dade County ordinance deals with association with a person. Both arguments are somewhat attractive, but neither is legally sound. As to the first argument, that Dade County's loitering ordinance only requires knowledge of mere possession of narcotics, it is universally known that possession of narcotics is a violation of the criminal laws of this State. Possession being a criminal violation, it is also a breach of the peace. If an ordinance proscribes loitering that threatens public safety or a breach of the peace, it can withstand constitutional attack. Chaplinsky v. New Hampshire, 315 U.S. 568, 62 S.Ct. 766, 86 L.Ed. 1031 (1942); Shuttlesworth v. City of Birmingham, 382 U.S. 87, 86 S.Ct. 211, 15 L.Ed.2d 176 (1965).
As to the second "fault" found by the circuit court, although the words of the two ordinances are not identical, the essential elements for conviction under both ordinances are the same. It is conceded that convictions under loitering ordinances in Dade County and Jacksonville touches somewhat upon an association with another person who is committing the crime. The Florida Supreme Court, in State v. Ecker, supra, upheld the constitutionality of Florida's loitering statute, Section 856.021, Florida Statutes (1973). Said statute reads as follows:
* * * * * *

*1074 "(1) It is unlawful for any person to loiter or prowl in a place, at a time or in a manner not usual for law-aiding individuals, under circumstances that warrant a justifiable and reasonable alarm or immediate concern for the safety of persons or property in the vicinity.
"(2) Among the circumstances which may be considered in determining whether such alarm or immediate concern is warranted is the fact that the person takes flight upon appearance of a law enforcement officer, refuses to identify himself, or manifestly endeavors to conceal himself or any object. Unless flight by the person or other circumstance makes it impracticable, a law enforcement officer shall, prior to any arrest for an offense under this section, afford the person an opportunity to dispel any alarm or immediate concern which would otherwise be warranted by requesting him to identify himself and explain his presence and conduct. No person shall be convicted of an offense under this section if the law enforcement officer did not comply with this procedure or if it appears at trial that the explanation given by the person is true and, if believed by the officer at the time, would have dispelled the alarm or immediate concern.
"(3) Any person violating the provisions of this section shall be guilty of a misdemeanor of the second degree, punishable as provided in § 775.082 or § 775.083."
The Supreme Court of Florida held that Section 856.021, Florida Statutes was not over-broad and construed the words "under circumstances that warrant a justifiable and reasonable alarm or immediate concern for the safety of persons or property in the vicinity" to mean those circumstances where peace and order are threatened and where safety of persons or property is jeopardized. The court went on to adopt the following language from the United States Supreme Court in Terry v. Ohio, 392 U.S. 1, 21, 88 S.Ct. 1868, 1880, 20 L.Ed.2d 889 (1968):
* * * * * *
"* * * The police officer must be able to point to specific and articulable facts which, taken together with rational inferences from those facts, reasonably warrant [a finding that a breach of the peace is imminent or the public safety is threatened]."
* * * * * *
The ruling in State v. Ecker, supra, is based upon the court's recognition that:
* * * * * *
"* * * if a statute proscribes loitering that threatens public safety or a breach of the peace, it can withstand constitutional attack. * * *"
* * * * * *
Section 21-31.1(b)(2) of the Code of Metropolitan Dade County clearly has criminal intent (scienter) written into the ordinance. The intent here is the knowledge on the part of the person loitering that he has voluntarily associated with one who is unlawfully possessing or using a narcotic or dangerous drug. As was stated in Commonwealth v. Tirella, supra, 249 N.E.2d p. 575:
* * * * * *
"A violation * * * is made out by proof that the defendant had more than casual or momentary association with another, with knowledge of the latter's illegal possession * * *"
* * * * * *
By enacting its loitering ordinance, Dade County has specifically defined the word "loitering" and the offense of loitering. Section 21-31.1(b)(2) defines loitering as knowingly committing four specific acts. Dade County's legislative body has gone a step further than State law and has also required the acts to be committed "knowingly". Clearly, a more specific culpability requirement and a more stringent standard for conviction are present under the County ordinance than under the State statute.
California has a loitering statute similar to Dade County's. California's statute reads as follows:

*1075 "It is unlawful to visit or to be in any room or place where any narcotics are being unlawfully smoked or used with knowledge that such activity is occurring." Section 11556, Health and Safety Code.
However, when the statute was first enacted, the scienter verbiage was omitted and the California Supreme Court struck down the statute as being unconstitutionally over-broad. Bonwell v. Justice Court for the Tulare Judicial District, 148 Cal. App.2d 906, 307 P.2d 716 (1957). Subsequently the California legislature included scienter as an element of the above statute and the statute was held constitutional. People v. Brim, 257 Cal. App.2d 839, 65 Cal. Rptr. 265 (1968).
Section 21-31.1(b)(2), Code of Metropolitan Dade County, requires that one must have knowledge of another's unlawful possession of narcotics. Moreover, the words "loiters * * * with one or more persons" imply some type of comradeship or companionship. While the ordinance might be unconstitutionally applied in certain situations, this is no ground for finding the ordinance itself unconstitutional. State v. Ecker, supra. Far from having an impermissibly broad prophylactic ordinance, Dade County punishes only knowing association with persons possessing or using narcotics.
Therefore, the judgment of reversal by the circuit court is quashed, with directions to reinstate the conviction and sentence rendered in the Metropolitan Court.
