
509 N.W.2d 266 (1993)
STATE of North Dakota, Plaintiff and Appellant,
v.
Michael O. DuPAUL, Defendant and Appellee.
CITY OF MINOT, Plaintiff and Appellant,
v.
Michael O. DuPAUL, Defendant and Appellee.
Cr. Nos. 930063, 930064.
Supreme Court of North Dakota.
December 9, 1993.
*268 John P. Van Grinsven III (argued), Asst. State's Atty., Minot, for plaintiffs and appellants.
Michael O. DuPaul, pro se.
LEVINE, Justice.
The State and the City of Minot appeal from a county court order dismissing criminal charges against Michael DuPaul. We reverse and remand for trial.
Shortly after 11:00 P.M. on May 18, 1991, Officer Bonness of the Minot Police Department received a radio dispatch that a light colored Monte Carlo, license number BMH807, had struck a viaduct on Broadway. Officer Bonness soon spotted a Monte Carlo closely matching the description, with license number BMH507, weaving in and out of heavy traffic on Broadway without signaling. Officer Bonness stopped the vehicle to investigate, and Officer Debowey arrived as a back-up.
The driver of the vehicle, DuPaul, was argumentative and uncooperative, his eyes were "watery and glassy looking," he had difficulty standing, and he smelled of alcohol. He refused to perform field sobriety tests. When Bonness requested that DuPaul have a seat in his patrol car, DuPaul asked if he were under arrest. When Bonness said no, DuPaul began backing away from the officers. Officer Debowey repeated the request that DuPaul be seated in the patrol car, and DuPaul turned and ran toward a nearby bar. The officers chased DuPaul, and, after a brief struggle, handcuffed him and placed him under arrest for preventing discharge of official duties.
DuPaul was transported to the Minot police station. Bonness asked him several times if he would consent to a blood test, and DuPaul responded that he wanted a doctor and a lawyer. DuPaul was provided with a telephone and a telephone book, but he did not call an attorney. Bonness eventually arrested DuPaul for driving under the influence, and DuPaul thereafter refused additional requests for blood tests.[1]
DuPaul moved to dismiss the charges, and a hearing was held. The county court[2] determined that DuPaul could not be found guilty of preventing arrest or discharge of official duties because he was never informed that he was under arrest. The court also *269 determined that the alleged illegal arrest precluded the DUI charge. An order dismissing both charges was entered on January 12, 1993.
Our first concern when the State appeals in a criminal case is whether we have jurisdiction. Section 29-28-07, N.D.C.C., authorizes an appeal by the State from an order quashing an information or indictment. We have consistently held that this includes the right to appeal from an order of dismissal that has the same effect as an order quashing an information. E.g., State v. Ritter, 472 N.W.2d 444, 447 (N.D.1991); State v. Thill, 468 N.W.2d 643, 645 (N.D.1991); State v. Hogie, 424 N.W.2d 630, 631 (N.D.1988). We conclude that we have jurisdiction over this appeal.
The State asserts that the county court erred in dismissing the charge of preventing discharge of official duties. The relevant statute is Section 12.1-08-02(1), N.D.C.C., which says in part:
"1. A person is guilty of a class A misdemeanor if, with intent to prevent a public servant from effecting an arrest of himself or another for a misdemeanor or infraction, or from discharging any other official duty, he creates a substantial risk of bodily injury to the public servant or to anyone except himself, or employs means justifying or requiring substantial force to overcome resistance to effecting the arrest or the discharge of the duty."
The statute creates two kinds of unlawful intent: (1) the intent to prevent arrest and (2) the intent to prevent the discharge of an official duty. The complaint in this case charged DuPaul with the intent to prevent the officer from discharging his official duties. The county court failed to recognize the statute's distinction between the two kinds of unlawful intent and dismissed solely on the basis that DuPaul was not under arrest when he fled:
"In this case the defendant asked am I under arrest and he was told no. The defendant turned and left and the officers then used force to [e]ffect an arrest. There is no record that they gave him notice of intention to arrest. The record is quite the opposite. When Officer Bonness answered Mr. DuPaul's question of whether or not he was under arrest by answering no, there was nothing to hold the defendant at that point. The defendant cannot prevent arrest or discharge of other duties when he has been told he was not under arrest. The defendant's Motion to Dismiss is granted."
Arrest of the person, or notice of intention to arrest, is not a prerequisite to commit the offense of preventing discharge of official duties. The elements of that offense, as charged in this case, are (1) "intent to prevent a public servant from ... discharging any ... official duty" (2) by "means justifying or requiring substantial force to overcome resistance to ... the discharge of the duty." Section 12.1-08-02(1), N.D.C.C. The Comment to Section 1302 of the proposed Federal Criminal Code, from which Section 12.1-08-02 was derived, clarifies that "[e]xecution of official duties other than arrest is also covered." Final Report, Proposed Federal Criminal Code, p. 105 (1971). The county court's conclusion that DuPaul was not under arrest was not dispositive.
The court's reliance upon lack of an arrest appears to have been induced by a misunderstanding of the law regarding investigatory vehicle stops. The court noted that, because DuPaul had been told he was not under arrest, "there was nothing to hold the defendant at that point." It is well settled, however, that DuPaul was not free to leave at that point, and the officers were authorized to detain him.
DuPaul was initially stopped pursuant to a valid investigatory vehicle stop.[3]*270 Once a vehicle has been validly stopped, the officer is authorized to order the driver out of the vehicle. Pennsylvania v. Mimms, 434 U.S. 106, 111, 98 S.Ct. 330, 333, 54 L.Ed.2d 331 (1977); State v. Gilberts, 497 N.W.2d 93, 96 (N.D.1993). The officer can also order the driver to sit in the patrol car while the officer issues a citation or further investigates the reasonable suspicion of a violation. State v. Mertz, 362 N.W.2d 410, 413 (N.D.1985).
As part of such an investigatory Terry stop, the officer is authorized to detain the person for as long as is reasonably necessary to effectuate the purpose of the stop. Florida v. Royer, 460 U.S. 491, 500, 103 S.Ct. 1319, 1325, 75 L.Ed.2d 229 (1983).[4] In the context of a vehicle stop, we said in State v. Mertz, supra, 362 N.W.2d at 412:
"A police officer may temporarily detain a traffic offender at the scene of a violation. See Sections 39-07-07 and 39-07-09, N.D.C.C. A reasonable period of detention includes the amount of time necessary for the officer to complete his duties resulting from the traffic stop .... After a lawful stop and during such temporary detention a traffic violator is subject to the arresting officer's authority and restraint until the officer completes issuance of the traffic citation and expressly releases the violator." (Citation omitted).
In this case, Officer Bonness stopped DuPaul's vehicle because he observed it weaving through traffic without signaling lane changes and because he had received a report that a vehicle matching that description had struck a viaduct. In the course of investigating those incidents, the officers were presented with facts giving rise to a reasonable suspicion that DuPaul was driving while under the influence of alcohol. They were justified in briefly detaining DuPaul to further investigate that suspicion. By fleeing while he was still being lawfully detained by the officers, DuPaul prevented them from carrying out their official duties to investigate a possible DUI and remove an alcohol-impaired driver from the roadway. The officers had to pursue DuPaul and physically restrain him to complete those duties. Depending upon the proof at trial,[5] DuPaul's conduct may have constituted a violation of the statute.
DuPaul also asserted that the officers acted in excess of their lawful authority, which would raise a statutory defense to the charge of preventing discharge of official duties. Section 12.1-08-02(2), N.D.C.C., provides:
"2. It is a defense to a prosecution under this section that the public servant was not acting lawfully, but it is no defense that the defendant mistakenly believed that the public servant was not acting lawfully. A public servant executing a warrant or other process in good faith and under color of law shall be deemed to be acting lawfully."
This court has held, however, that the statute creates a factual defense which is inappropriate for pre-trial determination and dismissal:
"More immediately, the criminal statutes still recognize justification defenses as factual remedies for official misconduct. Resistance to `excessive force' by an officer acting under color of law is a factual defense to any criminal charge arising from the resistance. NDCC 12.1-05-03(1). Specifically, where the charge is preventing arrest, as in this case, the defining *271 statute authorizes `a defense to a prosecution under this section that the public servant was not acting lawfully....' NDCC 12.1-08-02(2). Factual defenses remain as remedies for unlawful official conduct.
"These defenses do not depend on judicial suppression of evidence or dismissal of charges. Rather, they depend upon full presentation of the facts to the trier of fact, usually the jury, for determination of the independent nature of the charged offense. Official misconduct is a justification defense to a charge of resisting arrest." (Footnote omitted).
State v. Ritter, 472 N.W.2d 444, 452-453 (N.D.1991). We have repeatedly cautioned that pre-trial proceedings are not the appropriate stage to resolve fact issues regarding guilt or innocence:
"A pretrial motion to dismiss cannot be converted into a summary trial of evidence, thereby depriving the fact finder, whether jury or judge, of its exclusive function of determining factual questions which have a bearing on a defendant's guilt or innocence."
State v. Hammond, 498 N.W.2d 126, 129 (N.D.1993). See also State v. Zeno, 490 N.W.2d 707, 709 (N.D.1992); State v. O'Boyle, 356 N.W.2d 122, 124-125 (N.D.1984).
We conclude that the county court erred in dismissing the charge of preventing discharge of official duties.[6]
The State also asserts that the court erred in dismissing the DUI charge. The county court gave the following reasoning for dismissing:
"The charge of driving under the influence followed the physical seizure of Mr. DuPaul. This charge must also fall as it was subsequent to notice to the defendant that he was not under arrest, apparently for anything. The City or State could have proceeded by warrant and complaint but chose not to, relying on a traffic citation instead. The defendant's Motion to Dismiss is granted in this case also."
Apparently, the court was applying a variation of "fruit of the poisonous tree" doctrine to dismiss the charges because of perceived errors by the officers in detaining and arresting DuPaul. However, an invalid arrest or unlawful detention does not ordinarily provide a basis for dismissing a complaint. City of Fargo v. Stutlien, 505 N.W.2d 738, 744 (N.D.1993); State v. Biby, 366 N.W.2d 460, 462 (N.D.1985). Furthermore, in this case we have held valid both the initial stop of the vehicle and the arrest of DuPaul for preventing discharge of official duties.
The county court also reasoned that the State improperly proceeded by a uniform traffic citation rather than by "warrant and complaint." Section 29-05-31, N.D.C.C., specifically authorizes use of the uniform traffic complaint and summons for all violations of statutes or ordinances relating to operation of a motor vehicle. If the court meant to imply that an arrest warrant was necessary because of the allegedly illegal arrest, we have resolved that issue against DuPaul.
Although not relied upon by the county court in dismissing the DUI charge, DuPaul also argued in his motion to dismiss that Officer Bonness denied him the right to consult with an attorney. DuPaul asserted that he had a right to a court-appointed attorney before deciding whether to submit to chemical testing. This issue was resolved against DuPaul in his appeal from the administrative revocation of his driver's license, in which we concluded that indigency does not enlarge the limited right to consult an attorney before testing, and that DuPaul did not have a right to court-appointed counsel at that stage. North Dakota Department of *272 Transportation v. DuPaul, 487 N.W.2d 593, 597 (N.D.1992).
We conclude that the county court erred in dismissing the charges against DuPaul. We reverse and remand for trial.[7]
VANDE WALLE, C.J., NEUMANN and SANDSTROM, JJ., and MICHAEL O. McGUIRE, District Judge, concur.
MICHAEL O. McGUIRE, District Judge, sitting in place of MESCHKE, J., disqualified.
NOTES
[1]  Additional facts are included in a previous opinion affirming the administrative revocation of DuPaul's driver's license. See North Dakota Department of Transportation v. DuPaul, 487 N.W.2d 593 (N.D.1992).
[2]  The DUI charge was originally brought in municipal court, with the City of Minot as plaintiff. That charge was transferred to county court, where the preventing discharge of official duty charge was pending. For clarity, we will refer to the City of Minot and the State collectively as "the State."
[3]  Although the county court did not rule on the issue, DuPaul, in his motion to dismiss, challenged the validity of the stop of his vehicle. We have already upheld an administrative finding of reasonable suspicion on these same facts in North Dakota Department of Transportation v. DuPaul, supra, 487 N.W.2d at 596. DuPaul's vehicle, license number, and location closely matched the information relayed to Officer Bonness about a vehicle striking a viaduct. Officer Bonness then personally observed DuPaul weaving in and out of traffic without signaling lane changes, in violation of Section 39-10-38, N.D.C.C., and a corresponding Minot ordinance. Officer Bonness clearly had a reasonable suspicion of a violation sufficient to justify an investigatory stop of DuPaul's vehicle.
[4]  The Court distinguished situations where an officer approaches an individual in a public place and asks if he is willing to answer questions. In that instance, the person is not obliged to answer and is free to walk away: "He may not be detained even momentarily without reasonable, objective grounds for doing so; and his refusal to listen or answer does not, without more, furnish those grounds." Florida v. Royer, 460 U.S. 491, 498, 103 S.Ct. 1319, 1324, 75 L.Ed.2d 229 (1983).
[5]  At this stage of the proceedings, many factual disputes remain. It will be for the fact finder to determine, for example, if DuPaul intended to prevent discharge of an official duty and whether his conduct justified substantial force to overcome his resistance.
[6]  Our decision should not be read as approving the officers' conduct in this case. Although we recognize that officers must make instantaneous decisions in the field, it would have been far better, in response to DuPaul's inquiry whether he was under arrest, to have affirmatively advised DuPaul that he was not free to leave. It is understandable that some lay persons will mistakenly assume that they are free to leave if told they are not under arrest. In order to reduce the risk of injury to officers, detainees, and bystanders, it would be preferable in such situations to immediately advise the person that he is not free to go.
[7]  DuPaul was represented by court-appointed counsel in the proceedings below. While the appeal was pending, DuPaul dismissed his original attorney, and the county court appointed a different attorney to represent DuPaul on the appeal. When DuPaul attempted to dismiss the second attorney the county court allowed the second attorney to withdraw. We refused to appoint another attorney to handle the appeal, and DuPaul has appeared pro se.
