For the failure of the state to comply with an order to produce a confidential informant, an information accusing two defendants, Manderville and Monticelli, of trafficking in cocaine was dismissed. The state appeals.
Manderville contended that the confidential informant privilege, which insulates a confidential informant from disclosure, is inapplicable because the state refused to agree that the confidential informant would not become a witness under any circumstances. The state responded that, if the informant were to become a witness, it would amend its reply to the discovery demand and Manderville would be given the opportunity to depose the informant. Further the state argued, since there was no need or present plan to call the informant at trial, the confidential privilege should apply.
The present controversy stems directly from the state’s equivocation as to whether it intended to call the confidential informant as a witness. The state contends that it had a right to preserve an option on use of the confidential informant at trial. We assume, for the sake of reaching the dispositive question, that the court’s order to produce the confidential informant was a proper one to force a timely election by the state. Deciding only whether dismissal of the case was an appropriate sanction, we hold that dismissal was not warranted.
Dismissal of a criminal case for violation of court orders is a drastic sanction which should be employed only as a last resort. See State v. Rodriguez, 483 So.2d 807 (Fla. 3d DCA), review denied, 492 So.2d 1334 (Fla.1986); State v. Del Gaudio, 445 So.2d 605 (Fla. 3d DCA), review denied, 453 So.2d 45 (Fla.1984). The appropriate sanction for the state’s failure to obey the court’s order, and one which would have satisfactorily protected the court’s integrity, would have been to exclude the informant from giving any testimony in the case.
Florida Rule of Criminal Procedure 3.220(c)(2), the controlling rule, provides that disclosure of a confidential informant can be compelled for discovery purposes only if that informant “is to be produced at a hearing or trial.” There is nothing in the spirit or letter of rule 3.220(c)(2) which requires the state to de*328cide irrevocably, upon the commencement of a prosecution, whether it will call a confidential informant as a witness. This observation is of course subject to the rule of prejudice. If the state decides late in the preparatory stage of trial that circumstances are such that there is a need to call the informant as a witness it must make a clear showing that the defendant will not be prejudiced or embarrassed in the preparation of a defense. We interpret the trial court’s order compelling disclosure of the informant as a determination that the defendant would suffer prejudice if the informant were not produced.1
State v. Glosson, 462 So.2d 1082 (Fla.1985), relied upon by the defendant, is not controlling. Construing Glosson in State v. Ruiz, 495 So.2d 256 (Fla. 3d DCA 1986), we held that the thrust of Glosson is to prevent the introduction of testimony by a confidential informant which may be tainted, if not perjured, as a result of an arrangement for a fee to be paid the informant based on the nature of his testimony. Where the confidential informant will not testify, of course, Glosson does not apply.
Unlike the present case, Glosson was presented to the trial court on stipulated facts for a legal determination on the defendants’ due process claim. It was agreed between the parties that each defendant had asserted an entrapment defense, that there was a contingent fee arrangement between an informant and the police conditioned on the informant's cooperation and testimony, and that the informant’s testimony and cooperation were necessary to a successful prosecution.
This case is distinguishable from Glosson mainly because here the defendants have not raised an entrapment defense, there is no stipulation that the informant's testimony is necessary to successful prosecutions, and there is no suggestion that the informant’s fee was contingent on the nature or value of the trial testimony. See Lee v. State, 490 So.2d 80 (Fla. 1st DCA 1986), quashed on other grounds, 501 So.2d 593 (Fla.1987); Yolman v. State, 473 So.2d 716 (Fla. 2d DCA 1985); Owen v. State, 443 So.2d 173 (Fla. 1st DCA 1983). Further it is alleged here, and is not yet disputed, that the confidential informant did not witness or participate in the trafficking offense.
A lesser sanction was justified, i.e., exclusion of the confidential informant’s testimony, but dismissal of the case was excessively drastic.
Reversed and remanded for further consistent proceedings.
. This court denied the state’s petition for certio-rari to review the order compelling disclosure of the confidential informant.