
412 A.2d 983 (1980)
STATE of Maine
v.
David EDWARDS.
Supreme Judicial Court of Maine.
April 1, 1980.
Henry N. Berry, III, Dist. Atty., Peter G. Ballou, Deputy Dist. Atty., Nancy Ziegler, Law Student (orally), Portland, for plaintiff.
Daniel G. Lilley (orally), E. Paul Eggert, Portland, for defendant.
Before McKUSICK, C. J., and WERNICK, GODFREY, NICHOLS and GLASSMAN, JJ.
*984 GODFREY, Justice.
David Edwards was indicated in September, 1978, on two counts, one alleging rape, 17-A M.R.S.A. § 252 (Supp.1979) and one alleging gross sexual misconduct, 17-A M.R.S.A. § 253 (Supp.1979). He was tried before a jury in March, 1979, and found not guilty of rape but guilty of gross sexual misconduct. The jury made a specific finding that Edwards and the prosecutrix were social companions on the occasion in question and that she permitted sexual contact. Edwards has made a timely appeal from that conviction. We sustain the appeal.
The parties gave conflicting stories at trial. The complaining witness, Ann, testified as follows: that on the evening of July 23, 1978, she and defendant's sister, Lisa, drove in Lisa's car from Cape Elizabeth to a pond in Scarborough; that they met the defendant, and Ann went swimming with him; that, while they were swimming, he put his hands on her breast and tried to undo the top of her bathing suit, but she pushed him away and ran out of the water, cutting her foot as she ran; that she asked Lisa to take her home, but Lisa said no; that Lisa then told defendant to take Ann home and he agreed to do so.
Ann testified further that on the way home Edwards drove down a dirt road to a gravel pit, locked the door of the car, forcibly removed her clothes and his own, and unsuccessfully attempted intercourse; that he then forced her to submit to oral sexual contact (which constitutes gross sexual misconduct as defined by section 253.)
At first, when Ann told her mother and investigating police officers what had happened, she omitted reference to any oral sex. At trial, she testified that she did not mention the gross sexual misconduct at first because her mother was there. The state's direct examination of Ann then proceeded as follows:
Q. At some point did you then tell the police about the incident?
A. Yes.
Q. Was your mother present then?
A. No, I told the cop that was taking my lie detector test.
The defendant's counsel immediately approached the bench and moved for a mistrial. The motion was denied. Defense counsel requested that no curative instructions be given on the ground that instructions would merely emphasize to the jury the fact that a lie detector test had been given. The denial of the motion for a mistrial is the first issue raised on appeal.
David Edwards testified to a different version of the events of the evening of July 23. He testified that Ann consented to his fondling her while they were swimming; that she asked him for a ride home; that she suggested they go somewhere to be alone on their way home and that she voluntarily participated in an attempt at intercourse, which failed; that he suggested oral sex, which she tried, but which caused her to burst into tears; that he then took her home, where she told him that her mother was going to be angry at her for being late.
At the end of defendant's testimony, the defense rested. A recess was taken, and after the recess the defense sought to reopen to present new evidence, a medical report and a photograph. The medical report was allowed in by consent, but the photograph, which had been given to defense counsel during the recess, was excluded under M.R.Evid. 403 on the ground that it was cumulative, confusing to the jury and of little probative value. The photograph had been taken about six months before the incident in question, on December 24, 1977. It depicted David Edwards and Ann sitting under a lighted Christmas tree in a friendly embrace. Its exclusion is the defendant's second ground for appeal.
State v. Gagne, Me., 362 A.2d 166, 170-71 (1976), held that although the results of lie detector tests are inadmissible, citing State v. Mower, Me., 314 A.2d 840 (1974), Maine does not have a per se rule requiring a mistrial for any reference by a witness to the fact that he or she has taken such a test. The Court ruled that it was within the trial justice's discretion to decide whether the defendant had been prejudiced by the reference and that this Court would *985 review only for abuse of discretion. That rule was recently applied in State v. Mitchell, Me., 402 A.2d 479, 482 (1979), and State v. Wilcox, Me., 387 A.2d 1124, 1126-27 (1978).
Appellant Edwards seeks to have the Court re-examine Gagne in light of the facts of this case. His argument is that the jury was able to draw from the witness's reference to a lie detector test an inference that could be just as prejudicial as evidence of the result itself. He asserts that the jury found for the defendant on all but the one point that was connected with the witness's reference, her testimony about gross sexual misconduct. He also asserts that the prosecutor apparently, either deliberately or negligently, failed to instruct the witness not to make any reference to the test. Edwards argues that the Gagne rule invites misconduct, either by prosecutors or by defendants seeking to bolster the credibility of their cases.[1]
We adhere to the Gagne rule. We do not find it necessary to require a mistrial to be automatic upon any mention of a polygraph examination by a witness. Our inquiry is limited, therefore, as in the previous cases, to whether the presiding justice abused his discretion in finding that the defendant was not prejudiced by the witness's reference to the fact that she had taken a lie detector test. State v. Gagne, supra at 170.
A reference to a lie detector test in a criminal trial is not ground for reversal if the result of the test cannot be inferred from the circumstances or if the reference is not prejudicial to the defendant. E. g., State v. Marquez, 113 Ariz. 540, 558 P.2d 692 (1976); Johnson v. State, 166 So.2d 798 (Fla.App.1964); State v. Mitchell, Me., 402 A.2d 479 (1979); Commonwealth v. Garland, 475 Pa. 389, 380 A.2d 777 (1977). However, if the jury can infer the result of the test, the reference may be ground for a new trial if it is prejudicial to the defendant in the context of all the evidence. E. g., Stack v. State, 234 Ga. 19, 214 S.E.2d 514 (1975). See Annot., 88 A.L.R.3d 227 (1978).[2] In particular, it has been held that evidence that a witness has taken a polygraph, offered by the state to bolster credibility, can be as damaging as evidence of the test results and should be excluded. Kaminski v. State, Fla., 63 So.2d 339 (1953); State v. Davis, La., 351 So.2d 771 (1977); Mattox v. State, 240 Miss. 544, 128 So.2d 368 (1961). The fact that the reference is isolated and inadvertent does not alone insure that the reference is not prejudicial. People v. Yatooma, 85 Mich.App. 236, 271 N.W.2d 184 (1978).
When the prosecutor's questioning inadvertently elicits a witness's reference to a polygraph test, there is cause for mistrial if, but only if, the reference to the test raises an inference about the result that substantially prejudices the defendant's case. Kaminski v. State, supra; State v. Davis, supra; Commonwealth v. Camm, 443 Pa. 253, 277 A.2d 325 (1971), cert. denied, 405 U.S. 1046, 92 S.Ct. 1320, 31 L.Ed.2d 589 (1972). In deciding whether to grant or deny a defendant's motion for mistrial in such a situation, the trial court must weigh various factors bearing on the substantiality of any resulting prejudice to the defendant. Among other factors, it must determine (1) whether the inference as to the result of the test may be crucial in assessing the witness's credibility, and (2) whether "the witness's credibility play[s] a vital role in the case." People v. Whitfield, 58 Mich. App. 585, 589-90, 228 N.W.2d 475, 477-78 (1975).
The facts of each case require close scrutiny to determine whether defendant has *986 been substantially prejudiced. Thus, in State v. Refuge, La., 270 So.2d 842 (1972), after the State had been improperly permitted to ask a hostile prosecution witness whether he had taken a lie detector test, the Supreme Court of Louisiana held the error harmless because, in the "total context of his testimony", where "all the indicia" pointed to the witness's trial testimony as a belated fabrication intended to exculpate defendant, the error was "unlikely... [to] contribute to any great degree in the jury's belief" that the witness's pretrial confession was true and his testimony at the trial untrue. Id. at 847. In a later case, however, the same court found reversible error when the credibility of a major prosecution witness, which was "of vital importance", was clearly bolstered by her reference to taking a lie detector test. State v. Davis, La., 351 So.2d 771 (1977).
In People v. Yatooma, 85 Mich.App. 236, 271 N.W.2d 184 (1978), the trial court had denied a motion for mistrial based on an isolated and inadvertent statement by a prosecution witness on cross-examination that he had been required to take a lie detector test before receiving immunity from prosecution. The reference was not emphasized during the trial, and defendant had refused a cautionary instruction. The appellate court, first noting that defendant had sought a mistrial below and that the reference by the prosecution witness in effect informed the jury of the test result, reversed, saying:
The most telling factor weighing for reversal is the effect of the remark on the critical issue of the trial, namely the relative credibilities of . . . [the State's witnesses] versus defendant. The jury, required to choose between two directly conflicting stories . . . cannot be presumed to have been unaffected by evidence that one of the witnesses had successfully passed a lie-detector test prior to his testimony. . . . A primary rationale behind exclusion of polygraph testimony is that such evidence is not as yet sufficiently reliable, by way of scientific recognition, to risk the potentiality that the trier of fact will suspend its powers of deliberation and rely solely on the results of the test. . . . We conclude that a sufficient possibility existed in defendant's trial that the jury may have resolved the credibility issue by reference to the polygraph testimony. We therefore must reverse the conviction. 85 Mich.App. at 241, 271 N.W.2d at 187 (citations omitted).
In the present case, the most important factor is that the credibility of Ann was a crucial issue. She was the principal prosecution witness, whose uncorroborated testimony provided the only basis on which the jury could find the defendant guilty. We have repeatedly held, where that is the case, that the jury must "scrutinize and analyze with great care" the testimony and credibility of the witness. E.g., State v. McFarland, Me., 369 A.2d 227, 229 (1977). Ann's statement that she had taken a lie detector test administered by the police came during the State's direct examination. The jury could have inferred naturally and reasonably that she had taken the test in connection with her account of the events of the evening and that the result confirmed her account. Such an inference is as damaging as if she had testified that she passed the test, and it must be prevented for the same reason that the results themselves are excluded from evidence. See State v. Mower, Me., 314 A.2d 840, 841 (1974); R. Field & P. Murray, Maine Evidence, § 403.6 (1976).
The reference in this case differs significantly from the references in State v. Gagne, Me., 362 A.2d 166 (1976), State v. Wilcox, Me., 387 A.2d 1124 (1978), and State v. Mitchell, Me., 402 A.2d 479 (1979). In Gagne, defense counsel elicited a reference to a polygraph test from a prosecution witness on cross-examination. The prosecution had presented other strong evidence of guilt. In Wilcox, again on cross-examination by the defense, a State's witness testified that she "did some kind of polygraph". Although the testimony of the witness was important as tending to show defendant's responsibility at the time of the criminal act, it was not the only evidence bearing on *987 that issue. We affirmed denial of a motion for a mistrial. In Mitchell, the defense called a police officer, and during cross-examination the prosecution asked the officer what his job was. He answered that he was a polygraph examiner. The presiding justice found that the reference was not so severely prejudicial, under the circumstances, as to require a mistrial. We affirmed, nothing that there was no evidence that any test had ever been administered to any witness in the case. 402 A.2d at 482.
In none of those three cases was the credibility of the prosecution's crucial witness bolstered by a statement, made during direct examination, that the police had given the witness a lie detector test. In the circumstances of the instant case, the only sensible inference the jury could have drawn was that the test related to the events to which Ann was testifying in court and that she passed the test inasmuch as the prosecution of defendant had gone forward.
We cannot find that Ann's remark was harmless merely because it was isolated and not purposefully elicited by the prosecutor. The reference was sufficient to inform the jury that she had taken the test, and the natural and reasonable implication of the reference was that she had passed it.[3] The presiding justice ruled that the reference was "sufficiently innocuous not to create prejudice". We do not know whether he reached this conclusion merely because there was no explicit reference to the result of the test or whether he even considered the seriousness of the possibility that the jury could draw an inference as to the result. Had he done so, he could not have found that it was impossible for the jury to draw such an inference. In the circumstances of this case, for the reasons set forth above, we think that the reference was substantially prejudicial and that the trial court erred in denying the motion for a mistrial.
It becomes unnecessary to discuss the defendant's other grounds for appeal.
The entry is:
Appeal sustained.
Judgment of conviction vacated.
Remanded for further proceedings consistent with this opinion.
POMEROY and ARCHIBALD, JJ., did not sit.
NOTES
[1]  Appellant cites Commonwealth v. Johnson, 441 Pa. 237, 272 A.2d 467 (1971), and People v. Rodgers, 66 Mich.App. 658, 239 N.W.2d 701 (1976), each of which involved a deliberate attempt by the prosecution to introduce testimony that a witness had taken a lie detector test. Neither case stands for the automatic mistrial rule that appellant espouses. We cannot say in this case that the prosecutor deliberately elicited the reference.
[2]  The cases collected in 88 A.L.R.3d 227 all involve evidence that the defendant had taken a polygraph and are not directly applicable here.
[3]  The record suggests that the prosecutor did not warn Ann in advance not to mention the lie detector test she had taken. A prosecutor has an obligation to caution his or her witnesses against testifying as to specific facts that the prosecutor knows are inadmissible. A failure to fulfill that obligation may, as it did here, result in substantial prejudice that requires a reversal.
