delivered the opinion of the court:
This is a writ of error to the circuit court of St. Clair County wherein defendant, James Dewey Hundley, was convicted by a jury of the crime of murder and sentenced to fourteen years imprisonment. No evidence was offered by defendant, he having elected to stand on his motion for a directed verdict.
The evidence presented to the jury showed that shortly after 1 :oo A.M. on April 23, 1953, the defendant, accompanied by one Patricia Fallon, entered the Spanish Inn tavern outside the city limits of East St. Louis and shot and killed one Claude Houston, the bartender. There were three patrons in the tavern when defendant entered, James Plummer, Jess Biggs and an unidentified girl. Plummer testified that he was sitting at the bar drinking a beer when defendant and Patricia Fallon entered; that he heard Houston say “Hello, Dewey,” and defendant replied, “Don’t Dewey me, you louse, you so-and-so, I thought you were my friendthat he started to drink his beer, heard three shots fired, looked up and saw defendant and Houston standing about three feet apart, each with a gun in his hand. He stated that as defendant was backing out of the tavern, he (witness) told Houston, “Put the gun down, Claude, I will get him” and as Houston started to put the gun down he started to fall; that witness went *246to the door and fired four shots at the car in which defendant and his girl friend were leaving. He stated he heard no other conversation between the parties, didn’t look until after the three shots were fired, didn’t see who fired them and did not examine the gun that Houston had to ascertain if it had been fired. Biggs testified that he was sitting at the far end of the bar with the unidentified girl and concentrating his attention upon her; that he looked up when he heard the conversation as related by Plummer and paid no further attention to defendant and Houston until he heard the shots; that when he did look, each man had a gun; that he did not know who fired the shots; that he later saw Houston’s gun lying on the floor but did not examine it to see if it had been fired. He further stated that two or three minutes elapsed from the time he heard the conversation until the shots were fired, that he heard nothing further but stated the parties might have been talking and he did not hear them.
The county coroner testified that he examined Houston’s body and his death was caused by two bullet wounds in his chest, one apparently fired directly in front entering the right side of the chest and the other entering under the right arm and crossing to the left side of the chest.
A deputy sheriff testified that he questioned defendant with reference to the shooting on April 23, 1953, in the presence of another deputy, now deceased, an assistant State’s Attorney, and the State’s Attorney’s stenographer, and the defendant made a statement which was reduced to writing and signed by him. One Joseph Koch testified that he was connected with the sheriff’s office at that time, that he saw defendant read the statement and he signed as a witness although he was not present when the statement was made. The assistant State’s Attorney and stenographer were not called as witnesses nor their absence explained. The State’s Attorney offered the written statement in evidence and defendant objected. The record is *247barren of any ruling by the court on this objection and the statement does not appear in the record here.
On motion of the State’s Attorney and upon his statement that Patricia Fallon was an adverse witness and that she had been charged as an accessory to this crime, the court entered an order granting her immunity from prosecution for this offense as provided by section 274 of division I of the Criminal Code. (Ill. Rev. Stat. 1953, chap. 38, par. 580a.) The defendant’s objection to this procedure was overruled by the court. The witness was then called and after being asked her name the State’s Attorney stated he wanted to make an offer, which was done out of the presence of the jury. The State’s Attorney stated that the witness had made statements to police officers, had testified at the coroner’s inquest, before the grand jury, and had talked to him the day before, but that now, on this day, she refused to tell him what her testimony would be; that the witness had formerly lived with defendant, had been seen talking with him and had her arms around him that day. He thereupon asked the court to make her the court’s witness. The court stated she had been granted immunity and the motion to make her the court’s witness would be denied until it appeared she was an adverse witness. She then testified she was with defendant on the morning of the offense, that she drove him to the inn, and, over defendant’s objection, she was permitted to testify that on the way to the inn defendant accused her of being intimate with the deceased. The State’s Attorney then asked her: “On the trip out to the Spanish Inn did he tell you why he was going out there ?” and she replied: “I cannot be positive of it but I think he told me he was going to kill Claude Houston; I don’t know whether he had the intention of killing him or not.” Defendant’s objection was overruled. The State’s Attorney then stated “I will ask her if she didn’t tell the police officers on the night of the 23rd of April, this year, that on the way to *248the Spanish Inn he told her that he was going to kill Claude Houston.” The defendant objected on the ground the State was attempting to impeach its own witness and the State’s Attorney stated he was attempting to show she was an adverse witness. The court then sustained defendant’s motion “as to impeaching his own witness” and then stated “The court will allow your motion to make her a witness of the court.”
The State’s Attorney then produced a written statement upon which witness identified her signature, and, reading from that statement, questioned her as to whether she had told the officers who took the statement from her that defendant had told her on the way to the inn that “he told me he was going to kill Claude Houston and if I said anything he would kill me too.” The witness was then asked, “I will ask you to state if you didn’t tell these same police officers that I mentioned before, ‘We arrived at the Spanish Inn at approximately 1:2g A.M. and both went in, and when we went in Claude Houston said, Hello Dewey, and Hundley walked to the right end of the bar, pulled his gun from his pants pocket and shot Claude Houston,’ isn’t that what you told the officers?” Defendant’s counsel’s objection to this line of questioning was overruled. On cross-examination by defendant’s counsel the witness stated she was with defendant when he called the police to come and get him and that she was “quite intoxicated” when she and defendant went to the Spanish Inn and that she had difficulty in clearly determining what was going on.
The defendant here contends that the court erred in calling Patricia Fallon as the witness of the court after granting her immunity as the State’s witness and erred in permitting improper cross-examination of her.
It is the well-established law of this State that where the State’s Attorney, for a sufficient reason which he shows to the court, doubts the integrity or veracity of an ad*249verse witness, he is not required to call him as a witness for the People and vouch for his testimony, but such witness may be made the court’s witness and cross-examined by either side. (People v. Daniels, 354 Ill. 600.) The purpose of this rule is to prevent a miscarriage of justice by having an eyewitness to the crime, for whose veracity neither party will vouch, fail to testify. (People v. Cardinelli, 297 Ill. 116.) But such witness should be an eyewitness to the crime, (Carle v. People, 200 Ill. 494; People v. Boulahanis, 394 Ill. 255,) and the cross-examination should be strictly restricted to the direct issues and not permitted on collateral matters. People v. Grigsby, 357 Ill. 141; People v. Boulahanis, 394 Ill. 255.
This practice by the courts should not be extended beyond an eyewitness to the crime and the cross-examination should be restricted to the issues involved. The absolute necessity for restricting the cross-examination of an adverse witness to the issues is pointed out in People v. Grigsby, 357 Ill. 141, where the collateral issue is strikingly similar to the case at bar. In that case, the witness was called by the State to show that the accused had come to her house late at night and said that he “had just shot a couple of guys.” After some preliminary questions it became apparent her testimony wás not going to be satisfactory to the State’s Attorney, he claimed surprise and presented a written statement taken from her. She was then called as the court’s witness and the State’s Attorney was permitted to cross-examine her on this statement as to whether she had not told him that defendant said that he had shot a couple of guys. The court there found this to be cross-examination of the court’s witness on a collateral issue and prejudicial error. The opinion, at page 148, stated: “In the case before us the issue is not whether the defendant said ‘he had shot a couple of guys,’ but whether he in fact shot them. * * * All of these matters sought to be introduced by the indirect method of *250advance impeachment of a witness who had not testified to the contrary are collateral to the main issue. * * * To permit this method of attack would be dangerous in the extreme. It would make it possible for anyone, in effect, to confess for a defendant and to do this without any liability for perjury. Anyone might with perfect safety make a false statement out of court, and not under oath, to the effect that the defendant had told him that he killed someone. When in court and under oath upon a material point, and thus subject to penalties for perjury, it is to be presumed that he would refuse to so testify. If the State’s attorney could be permitted, under these circumstances, to prove, by way of advance impeachment, that the witness said that the defendant had said certain things, it would present a situation of appalling seriousness. The witness could not be indicted for perjury, the previous statement not being under oath and there being no provision for such an oath. If the witness admitted making the previous statement, it would prove nothing except that he, an admittedly unreliable witness, had said so. If the witness denied making the statement the matter would necessarily end there, because to pursue it further would be trying a collateral issue rather than a fact material under the indictment. The defendant would thus be hopelessly enmeshed in a prejudicial situation without anyone having assumed responsibility or liability for perjury.”
In People v. Johnson, 333 Ill. 469, defendant was tried for a burglary in which a radio and other articles were stolen. At the request of the State’s Attorney the court called, as the court’s witness, one who had told certain people she had bought the radio from defendant and later said she got the radio from another person. She testified that she did not buy the radio from defendant. The State’s Attorney then cross-examined her as to whether she had previously told four certain people she got the radio from defendant. She denied this and the four people to whom *251she allegedly made the statement were called and testified, over objection, that she did make that statement to them. The court found this to be reversible error, saying, at page 475, “The only object of having her called as a witness was not to get the testimony which she was expected to give, but to get before the jury her unsworn statement which it was intended to offer under the guise of impeachment. Having been admitted by the court as evidence in the case, it was certain to be regarded by the jury as evidence of the fact of purchase, though it had in law no effect for that purpose. The cross-examination had nothing to do with the issues involved in the case but was altogether collateral.”
In People v. Barragan, 337 Ill. 531, a codefendant who had pleaded guilty was returned from the penitentiary and called to testify as the court’s witness. He testified that the defendant then on trial for the same crime was not with him when the crime was committed. The State’s Attorney was then permitted to cross-examine him and to get before the jury a statement which the witness had made to the police out of the presence of defendant that defendant was with him when the crime was committed. The court admitted this evidence only for the purpose of impeachment but it was still found to be reversible error. The court said, at page 535, “This statement made out of the presence of plaintiff in error, though offered for the purpose of impeaching Drury [the witness] by showing that he had made a statement out of court differing from his testimony on the witness stand, was hearsay and was incompetent and immaterial as against plaintiff in error, who was then on trial. [Citations.] What Drury said to the officers out of the presence of plaintiff in error as to the latter’s guilt was not evidence and could not be received as such against the latter on the trial of the charges against him. The whole purpose of the offer was to get before the jury evidence of Drury’s unsworn statement *252that Barragan [defendant] participated in the crime. The admission of this statement was highly prejudicial to Barragan.”
And so it is in the base at bar. The purpose of calling Patricia Fallon as a witness was not to get her testimony which she was then ready to give under oath. If it was, there was no need to make her the court’s witness. She had been granted immunity and could testify freely as to any material issue. The real purpose of making her a court’s witness could only have been for the purpose of getting her statement, made to the police officers out of the presence of defendant, before the jury. That statement was purely hearsay in the trial of this defendant. If she had been a willing witness, it is elementary that neither she nor the officers to whom it was made could have testified to it. It cannot be made competent evidence by her refusal to repeat it under oath.
The evidence in this case is not conclusive of defendant’s guilt of the crime of murder. No serious altercation preceded the shooting. Three shots were fired, only two of which struck deceased. Both men were seen standing with guns in their hands when the firing ceased. Neither gun was produced in evidence, there is no proof that either was examined to ascertain how they had been fired, and no investigating police officer testified.
Under these circumstances the purely hearsay statement put before the jury that “he told me he was going to kill Claude Houston and if I said anything he would kill me too” was highly prejudicial to defendant, and reversible error.
In view of our determination on this error it is unnecessary to consider other errors claimed by defendant. The judgment of the circuit court of St. Clair County is reversed and this cause is remanded for a new trial.
Reversed and remanded.