
28 Kan. App.2d 452 (2001)
17 P.3d 951
STATE OF KANSAS, Appellee,
v.
WILLIAM J. GRACE, JR., Appellant.
No. 83,250.
Court of Appeals of Kansas.
Opinion filed January 5, 2001.
*453 Kathryn B. Wall, assistant appellate defender, and Jessica R. Kunen, chief appellate defender, for appellant.
Boyd K. Isherwood, assistant district attorney, Nola Foulston, district attorney, and Carla J. Stovall, attorney general, for appellee.
Before BEIER, P.J., GERNON, J., and JANICE D. RUSSELL, District Judge, assigned.
BEIER, J.:
Defendant-appellant William J. Grace, Jr., appeals his conviction of possession of methamphetamine after a prior conviction. He questions the district court's refusal to suppress evidence seized at the time of his arrest and argues that he should have been charged with possession with intent to sell, which, in his case, would have subjected him to less severe punishment. Because we reverse the district court's ruling on the motion to suppress, the issue regarding the prosecutor's choice of charge is moot.
Grace was a passenger in a car that pulled up to a Wichita bar so that another passenger could check whether a friend was inside. Two officers of the Wichita Police Department observed the car in its parking place outside the bar for approximately 5 seconds and decided to "make sure the driver wasn't intoxicated" and to see if anyone in the car was "doing any illegal activity." One of the *454 officers was familiar with at least one of the two persons in the front seat, which caused him to initiate the contact.
There was no evidence of alcohol or drug use in plain sight when the officers walked up to the car. According to them, one of the officers asked the front-seat passenger to get out of the car, and Grace and the driver got out of the car at the same time. The officers conducted a warrant check on the occupants of the car, which took at least 15 minutes. One of the officers testified that, while he and his partner were waiting for the ultimately negative results, Grace was free to leave; but neither of the officers informed any of the occupants of the car that they were free to go. Grace testified that the officers had his and the other occupants' identification cards while they were waiting for the warrant check results.
According to the police, one of the officers then asked Grace if he could search him for weapons and contraband. Grace responded, "Sure, go ahead." The police found a black pouch on Grace's ankle, which contained, among other things, several baggies of methamphetamine and three syringes.
Trista Reeves, the passenger of the car who had gone inside the bar to check on the whereabouts of a friend, came out of the bar during these events. She testified that, as she approached the car, the officers told her to step back and ordered everyone out of the vehicle. She and the other occupants of the vehicle were then searched, allowed to get back in the car, and told they could leave. According to Reeves, they did not leave at that point because the police returned to the car, asked Grace to get out, and searched him again.
Grace also testified that he was searched two times. He said that the officers ordered him out of the car and asked if they could search him. He said yes, and they conducted the search, finding nothing. After the warrant check was completed, according to Grace, the officers gave the occupants of the car their ID cards back and told them they were free to go. After he had gotten back into the car, Grace said the officers pulled him back out of the car and searched him again without his consent.
After his arrest, Grace told one of the officers that he had been using methamphetamine for about 10 years and said he usually *455 used half of the drugs he obtained and sold the other half to support his habit.
The defense filed a motion to suppress the evidence found in the black pouch, asserting any consent to search was involuntary because the stop was illegal. The defense also filed a motion to dismiss, arguing Grace was improperly charged with violating the general statute prohibiting possession of a controlled substance after a prior conviction, rather than the specific statute of possession with intent to sell.
The district judge denied both motions, finding the decision to charge possession of methamphetamine after a prior conviction was within the prosecutor's discretion and stating with regard to the motion to suppress:
"I'll find that because of the officer's knowledge of the problems at the bar, the officer's knowledge that the bar's posted no loitering, because of the time of day, ... an early morning hour on ... a Friday morning, ... the officers had probable cause to stop and investigate.... I'll find that it's more probably true than not true that Mr. Grace voluntarily exited the vehicle without being asked to do so. That he voluntarily consented to Officer Nichols [sic] doing a patdown search.... That the request for a patdown search was reasonable. The consent was voluntary. And the motion to ... suppress is denied."
At the time of Grace's arrest, Wichita had in effect an ordinance that made it unlawful to
"loiter, loaf, wander, stand or remain idle either alone and/or in consort with others in a public place in such manner as to:
"(1) Obstruct any public street, public highway, public sidewalk or any other public place or building by hindering or impeding or tending to hinder or impede the free and uninterrupted passage of vehicles, traffic or pedestrians;
"(2) Commit in or upon any public street, public highway, public sidewalk or any other public place or building any act or thing which is an obstruction or interference to the free and uninterrupted use of property or with any business lawfully conducted by anyone in or upon or facing or fronting on any such public street, public highway, public sidewalk or any other public place or building, all of which prevents the free and uninterrupted ingress, egress, and regress therein, thereon and thereto." Wichita City Ordinance § 5.48.020.

Motion to Suppress
We give deference to the factual findings of the district court on review of a ruling on a motion to suppress and uphold those findings *456 if they are supported by substantial competent evidence. State v. Bone, 27 Kan. App.2d 582, 583, 6 P.3d 914 (2000). The voluntariness of a consent to search must be determined from the totality of the circumstances and is a question of fact. State v. Rice, 264 Kan. 232, 242, 955 P.2d 1258 (1998).
However, the ultimate determination of the suppression of evidence is a legal question requiring independent appellate determination. Bone, 27 Kan. App.2d at 583. More specifically, if a person consents to a search after an illegal stop or during an illegal detention, the court must evaluate whether the consent purged the taint of the earlier illegality. Rice, 264 Kan. at 241. If the district court did not specifically apply the taint analysis to the consent, the appellate court is empowered to do so upon a sufficient record on appeal. State v. Crowder, 20 Kan. App.2d 117, 122, 887 P.2d 698 (1994). The factors to be considered in the taint analysis are "the proximity in time of the Fourth Amendment violation and the consent, intervening circumstances, and particularly the `purpose and flagrancy' of the officers' misconduct." Rice, 264 Kan. at 242 (quoting Crowder, 20 Kan. App.2d at 122). If the appellate record is insufficient to enable the analysis, then the case must be remanded for further evidentiary hearing and findings by the district court. See United States v. Holt, 229 F.3d 931, 941 (10th Cir. 2000).
We must also bear in mind that, on a motion to suppress, the State bears the burden of proving the lawfulness of the officer's conduct in question. See K.S.A. 22-3216(2); State v. Houze, 23 Kan. App.2d 336, 337, 930 P.2d 620, rev. denied 261 Kan. 1088 (1997).
Based on these standards, analysis of a case such as this must follow these steps: (a) Did the interaction between the officers and the car's occupants result from a voluntary encounter rather than a stop or seizure subject to Fourth Amendment evaluation? (b) If the initial contact did not qualify as a stop, did the continued contact convert an otherwise voluntary encounter into an investigatory detention? (c) If the initial contact qualified as a stop or the continued contact converted a voluntary encounter into an investigatory detention, was it based on a reasonable and articulable suspicion that the occupants of the car had committed, were *457 committing, or were about to commit a crime? (d) If the stop or detention was unlawful, is the appellate record sufficient to enable us to analyze whether the consent purged whatever taint arose? and/or (e) If the appellate record is sufficient for us to make a determination, did the consent purge the taint here?

Voluntary Encounter or Stop
The State cites Crowder, 20 Kan. App.2d at 120-21; State v. Marks, 226 Kan. 704, 709, 602 P.2d 1344 (1979); and State v. Reason, 263 Kan. 405, 951 P.2d 538 (1997), in support of its argument that the initial contact between Grace and the officers was a voluntary encounter.
In Crowder, the defendant initiated contact with the police. The Crowder panel found that fact "dispositive" in ruling that the initial contact was voluntary and that an ensuing consent to search was sufficient. 20 Kan. App.2d at 122.
In Marks, a police officer approached two men seated in a parked car because he thought the men matched the general descriptions of those wanted in connection with criminal activities. Once he arrived at the car, the officer asked the occupants for identification. The Marks court held this initial interaction between the police officer and the defendant did not constitute a stop. 226 Kan. at 707-10.
In Reason, the defendant was sleeping in a parked car on a hot day when officers approached to find out why the car was there and if the defendant was intoxicated or unconscious. The defendant got out of the car and identified himself. He said that his wallet had been stolen, that he had no written identification, and that he owned the car. The officers ran a check of the car's identification number, which revealed the car was registered to the defendant, with a Kansas tag. The defendant explained why the car in fact had a 30-day New Mexico tag, and the officers told him he was free to go. However, before the defendant could leave, the officers asked if they could search the car. The defendant consented, and the search turned up drugs. The Reason court found that the initial approach and questioning constituted a voluntary encounter but that, as it evolved over 20 minutes into a check for warrants and *458 the car's ID, the "voluntary encounter began to resemble an investigatory detention." 263 Kan. at 412.
We believe the facts of this case are most closely analogous to Reason. Even if the officers' initial approach of Grace and the other occupants of the car did not qualify as a stop, the continued interaction for approximately 25 minutes while the warrant checks were run converted what could have been characterized as a voluntary encounter into an investigative detention. Although officers are entitled to approach a stopped car and ask a few questions, see Reason, 263 Kan. at 410 (citing Florida v. Bostick, 501 U.S. 429, 434, 115 L. Ed.2d 389, 111 S. Ct. 2382 [1991] [so long as reasonable person would feel free "`"to disregard the police and go about his business, "`"encounter consensual]), they clearly did more than that here. See also State v. Damm, 246 Kan. 220, 224, 787 P.2d 1185 (1990) (scope, duration of seizure must be strictly tied to and justified by circumstances that made its initiation proper). "An investigative detention must last no longer than is necessary to effectuate the purpose of the stop. [Citation omitted.]" State v. DeMarco, 263 Kan. 727, 734, 952 P.2d 1276 (1998). Here the encounter probably ceased to be consensual when the officers took the occupants' ID cards back to the police car to run checks. At that point, the occupants were no longer genuinely free to leave, and the encounter became an investigatory detention. The officers did not return Grace's ID card until just before he was searched, approximately 25 minutes after the initial encounter. When the encounter became nonconsensual, the Fourth Amendment's protections were implicated.

Reasonable and Articulable Suspicion
On appeal, the State asserts that the encounter was supported by reasonable and articulable suspicion because the officers suspected the occupants of the vehicle were violating the ordinance. K.S.A. 22-2402(1) permits a law enforcement officer to stop a person in a public place if the officer reasonably suspects that the person is committing, has committed, or is about to commit a crime. See Terry v. Ohio, 392 U.S. 1, 20 L. Ed.2d 889, 88 S. Ct. *459 1868 (1968); State v. Maybin, 27 Kan. App.2d 189, 200-01, 2 P.3d 179, rev. denied 269 Kan. 938 (2000).
We cannot accept the State's assertion on the district court's conclusion that the officers had a particularized and objective basis for suspecting Grace was involved in criminal activity. See De-Marco, 263 Kan. at 735. The officers observed the car in its parking place for a mere 5 seconds before they elected to approach its occupants. They could not have reasonably concluded in that time frame that Grace and the others were guilty of or about to be guilty of loitering, which requires obstructive behavior. Loitering was not the reason the officer cited in the suppression hearing. In addition, once the officers drew closer to the car, they observed nothing to raise their suspicion or necessitate detention of Grace and the others. Unless Grace's later consent to search purged the taint of his unlawful stop and/or detention, the motion to suppress should have been granted.

Sufficiency of Record and Taint Analysis
The district court concluded simply that Grace's exit from the vehicle and his consent to search were "voluntary." Because it did not view the initial encounter with the police or Grace's detention as unlawful under the Fourth Amendment, it did not engage in an analysis of whether Grace's consent purged the taint of the improper police conduct. Because we have reached the opposite legal conclusion, i.e., that either or both the initial interaction or the continued detention violated the Fourth Amendment, a taint analysis becomes necessary. As outlined above, we next must determine whether further facts are needed to conduct that analysis.
On this appeal, we are fortunate to have a fully developed record on the suppression issue. The district court presided over a lengthy evidentiary hearing in which one of the police officers, Grace, and Reeves all testified. Both sides of the issue were argued by counsel. We cannot conceive of any additional useful information that could be gained from further hearing in the district court. We therefore will not remand for such a hearing and will conduct the taint analysis based on the factual record before this court.
*460 Consent to search removes the taint of a prior illegal seizure if it was voluntarily given under the totality of the circumstances. See Crowder, 20 Kan. App.2d at 122. "This analysis requires consideration of the proximity in time of the Fourth Amendment violation and the consent, intervening circumstances, and particularly the `purpose and flagrancy' of the officers' misconduct. U.S. v. Mendoza-Salgado, 964 F.2d 993, 1011 (10th Cir. 1992)." 20 Kan. App. 2d at 122.
In State v. Schmitter, 23 Kan. App.2d 547, 556, 933 P.2d 762 (1997), the court stated: "[W]hen the consent to search is preceded by a Fourth Amendment violation, the State, in addition to proving the voluntariness of the consent, must also establish a break in the causal connection between the illegality and the evidence thereby obtained. U.S. v. Melendez-Garcia, 28 F.3d 1046, 1053 (10th Cir. 1994)."
Grace argues consent was obtained during the illegal detention and was a product of the illegal detention; there were no intervening events separating the detention from the consent; and the officers had no justification for unlawfully detaining him or for the search following the detention.
Grace correctly points out that the illegal detention and the request for consent to search were in close temporal proximity. Also, unless waiting for the results of the checks for warrants is considered an intervening circumstance, no intervening events separated the illegality and the request to search. Compare Rice, 264 Kan. at 241-44 (taint not purged when no intervening circumstances sufficient to adequately separate consent from unlawful detention).
In terms of the purpose and flagrancy of the officers' misconduct, we can certainly imagine worse abuses of police authority. However, our review of the record persuades us that the stated purpose of the officers' behavior has varied. Although appellate focus has been on the loitering statute, the officer testified that he and his partner were motivated by a desire to check whether the driver was intoxicated and whether anyone in the car was engaging in illegal activity. It also appears that the real purpose may have had more to do with one of the officer's familiarity with the driver's or front-seat passenger's past accusations or arrests. This variability *461 in the officers' story does not fill us with confidence. Considering the totality of the circumstances, we hold that Grace's consent did not purge the taint of the previous illegality. The evidence should have been suppressed as fruit of the poisonous tree under Wong Sun v. United States, 371 U.S. 471, 9 L. Ed.2d 441, 83 S. Ct. 407 (1963). This outcome on the suppression motion necessitates dismissal of the charge against Grace.
Reversed and remanded for entry of an order of dismissal.
