*167OPINION
By the Court,
Zenoff, C. J.:Richard Founts and Gary Luffman were convicted of two counts of armed robbery and one count of attempted robbery for the September 9, 1969 robbery of a Reno barber shop.
Founts was identified as the robber by the three barbers who were in the shop at the time of the robbery. One of the barbers, Mr. Keough, testified at the grand jury hearing that he had been held up by Founts in April of 1969. He said that he recognized Founts’ voice before even turning to see him, since “When a man says ‘Stick them up’ twice, you recognize that voice.”
Before the trial began the defense moved to exclude testimony with regard to the previous robbery. The motion was tentatively granted at that time and later modified so as to allow reference to the earlier meeting, but without detailed testimony to show the circumstances of that meeting.
In his examination of Mr. Keough, the prosecuting attorney referred to the April meeting as an “unfortunate confrontation” and characterized the circumstances as “highly unusual.” No reference was made to the details of that meeting. The only reference to the April meeting which tended to show a robbery had taken place was Mr. Keough’s response to a series of questions by Founts’ counsel. Keough stated, “When a man says, ‘Stick them up’ twice to you, you remember it.”
None of the three barbers saw Luffman who was allegedly the driver of the getaway car. His conviction was based solely on the testimony of a prosecution witness, Wayne Noel. Noel stated that he arrived at Luffman’s on the morning of September 9, stayed through the day and drove to downtown Reno with Luffman and Founts. He was left in Reno and did not see the defendants again until later that evening, when he returned to Luffman’s. He stated that the defendants were dividing some money and talking of a robbery they had committed when he returned. They told him they had left his car, which was identified as the robbery car, in downtown Reno.
Luffman sought to introduce the testimony of his roommate, Edward Harris, to show that they were together at the time of the robbery. Though the state had been orally notified several days before the trial began that Luffman intended to offer *168this testimony, it objected to the admission of the testimony because NRS 174.087(1) had not been followed.1 By an offer of proof, it was shown Harris would testify that he was with Luffman all day on September 9 and that they left together at 9:00 p.m. According to Harris, Noel left alone at about 5:00 p.m. Harris was allowed to testify before the jury as to events before 5:00 p.m. and after 9:00 p.m. but was not allowed to state that Noel left alone or that Luffman was at home at 6:00 p.m. when the robbery took place.
Essentially two issues are addressed on this appeal: (1) Whether the trial court erroneously allowed the introduction of testimony with regard to the April offense; and (2) Whether it was an abuse of discretion to disallow the alibi testimony of Harris.
1. This court has frequently held that evidence of previous offenses may be admitted only for limited purposes, and then only if its prejudicial effect is outweighed by its probative value in achieving that purpose. Tucker v. State, 82 Nev. 127, 412 P.2d 970 (1966); Nester v. State, 75 Nev. 41, 334 P.2d 524 (1959); State v. Roberts, 28 Nev. 350, 82 P. 100 (1905). Because there was other evidence substantially establishing the element of identity, the probative value of testimony as to the April offense was diminished and that testimony was properly ordered excluded. Tucker v. State, supra.
Though the prosecution repeatedly referred to the “unusual” or “unfortunate” nature of the April meeting, nowhere in the course of the examination of Mr. Keough did it elicit a description of the offense which occurred. Therefore, no damaging previous-offense testimony was introduced and the rule proscribing the introduction of such testimony was not violated. Cf. Miller v. State, 86 Nev. 503, 471 P.2d 213 (1970). The only testimony as to the offense which occurred in April was *169elicited as direct response to the questioning of defense counsel and may not be raised by the defendant as a basis of error.
The other asserted errors raised by Founts are without merit. Therefore, the conviction with respect to Founts must be affirmed.
2. Statutes such as NRS 174.087(1) which require notice to the prosecution when an alibi defense is contemplated are usually strictly applied. Annot. 30 A.L.R.2d 480 (1953). Strict compliance is compelled with the purpose of preventing the “popping up” of alibi witnesses at the eleventh hour when the prosecution will be unable to investigate the veracity of the alibi testimony. Williams v. Florida, 399 U.S. 78 (1970); State v. Dodd, 418 P.2d 571 (Ariz. 1966); People v. Schadd, 292 N.Y.S. 616, 617 (Queen’s County Ct. N.Y. 1936); State ex rel. Simos v. Burke, 163 N.W.2d 177 (Wis. 1968).
Such strict compliance should not be blindly required if the end result will make the criminal prosecution a game, however. Commonwealth v. Shider, 224 A.2d 802 (Pa.Super. 1966); State ex rel. Simos v. Burke, supra; see generally Brennan, The Criminal Prosecution: Sporting Event or Quest for Truth 1963 Wash. U.L.Q. 279. The statute allows for the trial court to exercise its discretion to allow introduction of alibi testimony despite noncompliance. That discretion should be exercised, according to the statute, when good cause for such exercise is shown by the defendant.
“Good cause” for the exercise of such discretion may be shown by a variety of factors and the particular situation presented by each case must be considered. Gray v. State, 161 N.W.2d 893 (Wis. 1968). Some of the factors considered are reflected in decisions of courts of other states, including, for example: Whether the testimony is sought to be introduced at such a late time in the course of the trial that even an adjournment for investigation would not cure the prejudice to the state, State v. Woodard, 246 A.2d 130, 134 (NJ.Super.App. Div. 1968); whether an excuse was shown for the omission, State v. Adair, 469 P.2d 823, 826 (Ariz. 1970); whether the information failed to describe the occurrence of the crime with sufficient specificity to enable the accused to prepare an alibi defense, Bush v. State, 454 P.2d 429, 434 (Kan. 1969); and whether the alibi had such substance as to have probative value to the defense, State v. Martin, 410 P.2d 132, 137 (Ariz.App. 1966).
*170Also relevant, by analogy, are cases discussing the effect of the state’s failure to give the required notice with regard to witnesses it intends to produce. Often emphasized is the factor of surprise and its consequent prejudicial effect upon the defendant’s investigation and cross-examination of witnesses. Battese v. State, 425 P.2d 606 (Alaska 1967); People v. Speck, 242 N.E.2d 208, 220 (Ill. 1968); Jackson v. State, 259 A.2d 587, 590 (Md.App. 1969). Also considered are reasons why the proper notice was not given, the value of the offered testimony, the prejudicial effect upon either side by the admission or nonadmission of the testimony and the feasibility of a postponement. State v. Miner, 258 A.2d 815, 825 (Vt. 1969).
In the instant case, we feel that an overview of the situation presented leads to the conclusion that there was good cause for allowing the alibi testimony despite noncompliance with NRS 174.087(1). The excluded alibi witness did not “pop up” at the eleventh hour, so the state cannot claim to have been surprised or prejudiced in its investigation. Moreover, defendant made an offer of proof at the trial as to what the alibi witness would testify. The importance of this testimony was evident since it directly contradicted that of the sole witness against Luffman. This case is thus similar to Commonwealth v. Shider, 224 A.2d 802 (Pa.Super. 1966). As the court held there, we hold that on the facts presented, requiring strict compliance with the statute would defeat the ends of justice and fair play which is the policy underlying the statute.
Affirmed as regards Appellant Founts; reversed and new trial ordered as regards Appellant Luffman.
Mowbray, Thompson, and Gunderson, JJ., concur.NRS 174.087: Notice of alibi by defendant before trial; district attorney to provide defendant with statement of results of investigation of alibi defense.
1. If a defendant intends to offer in his defense evidence to establish an alibi, he shall give the district attorney written notice thereof not more than 3 days after the day of arraignment or 10 days before the date set for trial, whichever is later. Such notice shall include specific information as to the place where he claims to have been at the time of the alleged offense. In default of such notice, evidence of such alibi shall not be received unless the court, upon good cause shown, otherwise orders.