
181 Ill. App.3d 300 (1989)
536 N.E.2d 71
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellant,
v.
DONALD A. HUGHES, Defendant-Appellee.
No. 2-87-1168.
Illinois Appellate Court  Second District.
Opinion filed February 3, 1989.
Modified on denial of rehearing February 23, 1989.
*301 Robert F. Casey and Gary V. Johnson, State's Attorneys, of Geneva (William L. Browers and Martin P. Moltz, both of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Fred M. Morelli, Jr., of Law Offices of Fred M. Morelli, Jr., of Aurora, and Vincent C. Argento, of Argento & Malcolm, of Elgin, for appellee.
Reversed and remanded.
JUSTICE McLAREN delivered the opinion of the court:
The State appeals from the trial court's order granting defendant's mid-trial motion to suppress evidence.
On July 3, 1987, at approximately 5:30 p.m., defendant, Donald A. Hughes, was involved in a traffic accident in which the truck he was allegedly driving tipped over near an intersection. Several police officers arrived and defendant was taken into custody. Defendant was charged with driving under the influence of alcohol (DUI) and five other traffic offenses. After defendant refused to take the breathalyzer test, he was read his Miranda rights. The defendant filed a mid-trial motion to suppress all statements made before the Miranda rights were given. Although the State agreed to hold a hearing during the trial, the State argued at the close of the evidence that the motion was not timely.
The trial court conducted the hearing on defendant's motion and granted the motion to suppress. The trial court determined that defendant was in custody shortly after the officers arrived at the scene of the accident and thus should have been given his Miranda *302 rights before any questioning took place. The court also found that, under the circumstances of the case, the mid-trial motion to suppress was timely filed. This appeal followed.
The State called three eyewitnesses to the stand before calling deputy sheriff Thomas L. Bumgarner. Deputy Bumgarner testified that he responded to a call concerning the accident. After arriving at the scene, a fellow police officer from a different jurisdiction informed Deputy Bumgarner that the defendant was in his custody. It was at this point in the trial that counsel for defendant made a motion to suppress. Counsel stated that he was not aware defendant was in custody and, as such, defendant was entitled to be given his Miranda rights. The trial judge decided to hear the motion in conjunction with the trial.
The testimony of Deputy Bumgarner resumed, and he testified that he informed defendant that he was investigating the accident. After questioning, defendant informed Deputy Bumgarner that he was the driver of the vehicle. The deputy then administered a field sobriety test, which defendant failed. Defendant admitted drinking "some beers" at lunch. Defendant was then arrested by Bumgarner and taken to the jail, where he was read his Miranda rights. After being read his rights, defendant admitted to drinking four or five beers at lunch and also stated that he was not the driver of the vehicle. Defendant stated that the passenger, Danny Salazar, paid defendant $100 to admit being the driver when initially questioned.
Defendant also testified at the suppression hearing. Defendant stated that Officer Dick Rust advised him that he was under arrest at the scene of the accident. Defendant testified:
"Q. [Defense counsel]: What did he [Officer Rust] say?
A. [Defendant]: He asked me for my driver's license.
Q. And what did you do then?
A. I  I  I had given  I gave him my driver's license.
Q. And what else did he say to you?
A. He told me to stand by the squad car.
Q. And did he say anything else?
A. I asked him if I was being [sic] under arrest. He said yes."
Deputy Bumgarner also testified that defendant was under arrest, stating: "Yes, he [the defendant] was not allowed to  to  his freedom, so, under the letter of the law, I guess he was under arrest."
At the conclusion of the above testimony, the trial judge granted defendant's motion to suppress. The trial court noted that all facts indicated that defendant was in custody such that he should have been given his Miranda warnings. The court also noted that the motion *303 was timely filed given the fact that counsel for defendant was not aware of the ground for the motion prior to trial.
 1-3 On appeal, the State contends that the trial court erred in allowing defendant's motion to suppress for two reasons: (1) the motion was not timely filed; and (2) Miranda warnings do not apply to a detainee at a routine traffic stop.
The State initially contends that defendant's motion to suppress was not timely filed and should not have been considered in the court below. Both parties agree that the Code of Criminal Procedure of 1963 requires such a motion to be made before trial unless there was not an opportunity to do so or unless the defendant was not aware of the ground for the motion before trial. (Ill. Rev. Stat. 1987, ch. 38, par. 114-11(g).) The motion was not filed before the trial began. Thus, the dispute arises as to whether one of the two exceptions applies in this case.
The Illinois Supreme Court has held that it is within the sound discretion of the trial court to entertain a motion to suppress evidence after the trial has begun. People v. Hoffman (1981), 84 Ill.2d 480, 485, 419 N.E.2d 1145; People v. Flatt (1980), 82 Ill.2d 250, 262, 412 N.E.2d 509.
It is evident, and both parties agree, that defendant had an opportunity to present the motion before trial. Thus, the inquiry focuses on whether defendant was aware of the ground for the motion before the trial began. Defendant's counsel claims that he was not aware that defendant was in custody when the statements were made until such testimony was elicited at trial. The State contends that defendant's attorney (Mr. Morelli) had to have some uncertainty in his own mind regarding whether defendant was in custody such that he should have filed a pretrial motion to suppress the statements. It is apparent that, during the trial, attorneys for both parties were surprised at Deputy Bumgarner's testimony. The assistant State's Attorney stated:
"Secondly, I  I was not aware of any custody beforehand, that's the reason the State did not supply anything to Mr. Morelli * * *. I understand that if, in fact, Mr. Morelli is just finding this out now, that it may have caught him by surprise * * *."
The court then responded:
"[A]t this point, what the record shows, Mr. Morelli, is surprise, that all of a sudden it appears that his client was in custody, and based upon the discovery that he received, he didn't have the faintest idea that his client was in custody."
The State's Attorney then agreed with the trial judge and stated:

*304 "That's accurate, Judge, and I think he's entitled to have a hearing."
At the close of the evidence, the State renewed its objection as to timeliness. The trial court determined that the motion to suppress was timely filed during the trial because defense counsel could not have been aware of the ground for the motion prior to trial. We disagree. The Illinois legislature enacted section 114-11 to allow for mid-trial motions to suppress in limited circumstances. The Illinois Supreme Court noted that this provision is necessary to prevent the prohibition against filing a motion to suppress during the trial from prevailing over defendant's constitutional rights. (Flatt, 82 Ill.2d at 262.) However, this case is not one in which the defendant should be allowed to claim surprise by the testimony of Officer Bumgarner regarding whether defendant was in custody at the time the statements were made.
We conclude that to not hold a mid-trial hearing in this case would not work to deprive defendant of his constitutional rights. This is especially true given that defendant should not have been surprised by Deputy Bumgarner's testimony stating that defendant was in custody. Defendant knew he was in custody when he asked Officer Rust if he was under arrest and received an affirmative response. Counsel for defendant certainly should have found out whether defendant was in custody at the time the statements were made before the trial began. We cannot allow defendant to forego filing a pretrial motion to suppress the statements when defendant knew, by way of his own testimony, for certain that he was in custody at the time the statements were made. There is no question that defendant was aware of the ground for the motion before trial, and consequently, there appears to be no justification for making the motion during trial rather than before the trial. People v. White (1985), 134 Ill. App.3d 262, 290, 479 N.E.2d 1121, cert. denied (1986), 475 U.S. 1126, 90 L.Ed.2d 194, 106 S.Ct. 1650.
Defendant contends that he was not aware of the ground for the motion prior to the inception of the trial. Defendant notes that both the assistant State's Attorney and his own counsel were caught by surprise by Deputy Bumgarner's testimony. However, we fail to see how the surprise to the attorneys can overcome defendant's in-court admission that he was under arrest. Section 114-11 places the inquiry on whether the defendant, not defendant's counsel, was aware of the ground for the motion before the trial began. It is difficult to comprehend how defendant could not be aware of the ground when he knew he was under arrest and not free to leave the accident site.
*305  4 Defendant last contends that to file a pretrial motion to suppress would have been frivolous and would have left him open to sanctions. (Ill. Rev. Stat. 1987, ch. 110, par. 2-611.) Such an argument is without merit. Defendant clearly knew he was in custody long before the trial began. Filing a pretrial motion to suppress the statements would not only have been not frivolous, it would have been the proper procedure. Furthermore, section 2-611 relates to civil, not criminal, cases and has no application here.
We hold that defendant had the opportunity to file the motion to suppress before trial and also had knowledge of the ground of the motion to adequately do so. The trial judge abused his discretion in holding that the motion was timely filed. Because of our disposition on this issue, we find it unnecessary to consider whether the Miranda warnings were required before the statements were made.
For the reasons stated above, the circuit court of Kane County should not have entertained and granted defendant's mid-trial motion to suppress. We reverse and remand.
Reversed and remanded.
INGLIS and REINHARD, JJ., concur.
