
446 A.2d 1035 (1982)
STATE
v.
Sidney Lee SMITH.
No. 81-608-C.A.
Supreme Court of Rhode Island.
June 15, 1982.
Dennis J. Roberts II, Atty. Gen., Jeffrey B. Pine, Sp. Asst. Atty. Gen., for plaintiff.
Paula Rosin, Asst. Public Defender, for defendant.

OPINION
PER CURIAM.
This case comes before this court pursuant to our order directing the state to show *1036 cause why the judgment of conviction of robbery should not be reversed.
At trial, defendant testified that he was present at the robbery scene but denied participation in the crime. On cross-examination, the prosecutor asked defendant a series of questions regarding defendant's failure upon his arrest to tell the police the story that he had told at trial and also regarding his refusal to sign a waiver of rights. The defendant's objection to this line of questioning was overruled by the trial justice.
Attempting to impeach the credibility of a defendant by raising his postarrest silence violates the due-process clause of the Fifth and Fourteenth Amendments. Doyle v. Ohio, 426 U.S. 610, 96 S.Ct. 2240, 49 L.Ed.2d 91 (1976). The Court in Doyle held that a suspect's silence is nothing more than an exercise of his Miranda right. "In such circumstances," the Court stated, "it would be fundamentally unfair and a deprivation of due process to allow the arrested person's silence to be used to impeach an explanation subsequently offered at trial." (Footnote omitted.) Id. at 618, 96 S.Ct. at 2245, 49 L.Ed.2d at 98. In view of Doyle, we hold that the trial justice erred in allowing the prosecutor to cross-examine defendant regarding his failure to tell the police the explanation that he subsequently offered at trial.
The state contends that even if it was error to permit such questioning, the error was harmless because there was overwhelming evidence to support the conviction. We disagree. In order to meet the harmless-error test, there must be proof "beyond a reasonable doubt that the error complained of did not contribute to the verdict obtained." Chapman v. California, 386 U.S. 18, 24, 87 S.Ct. 824, 828, 17 L.Ed.2d 705, 710 (1967); see State v. Duffy, 112 R.I. 276, 283, 308 A.2d 796, 800 (1973); State v. Geter, 108 R.I. 437, 442, 276 A.2d 274, 276 (1971). The crucial issue in the instant case was one of credibility. The line of questioning which was improperly allowed bore directly on the credibility of the defendant's testimony. We cannot say, therefore, that in this case the error did not contribute to the guilty verdict. Accordingly, we find that the error was not harmless.
The defendant's appeal is sustained, the judgment of conviction is reversed, and the defendant is granted a new trial.
