Orton, C. J.
The defendants were informed against, tried, convicted, and sentenced to imprisonment in the state prison for the crime of robbery and stealing from the person of one Joseph Preedon the sum of $20. As we understand the record, there are but two assignments of error: (1) The court admitted in evidence the confession of the defendant Joseph Shephard to the police officers while he was in custody in the common jail, and the evidence had its effect on the jury, and then the court excluded it as being a confession made under duress and extorted by threats, promises, and by falsehood. The court should have determined whether the confession was admissible *186before it was given in evidence. (2) The court, after having excluded the confession as incompetent, allowed the district attorney to cross-examine the defendant Shephard, who had offered himself as a witness, as to whether he made such confession, and, he having dénied it, allowed evidence on behalf of the state to contradict the testimony of Shephard by evidence that he did make such confession, and the particulars thereof.
1. We are of the opinion that said first error is well assigned. The testimony was before the court as to the manner in which the confession had been obtained, and the court should have decided it as a preliminary question before admitting the whole'’ confession in evidence. Every word of the confession was fastened on the minds of the jury, and had made its impression there against the accused. Its subsequent rejection by the court would not -erase or remove that impression. It had produced its lasting effect upon the jury, and must have affected their verdict. The remarks of the learned judge in ruling upon the objections to the evidence were well calculated to deepen the impression already made by the evidence upon the minds of the jury. We cannot but think that this was a material error and prejudicial to the accused.
2. The method here adopted to get the confession of Joseph Shephard in evidence, after it had been excluded by the court as being incompetent and inadmissible by reason of its having been extorted by promises of immunity and threats of injury and by falsehood, was certainly very ingenious and plausible. It would seem as if it was made to fit the case of Comm. v. Tolliver, 119 Mass. 313. It was this case that induced the court to admit the evidence. That was also a case of robbery, and by more than one defendant, and one of them made a confession to the officers in the jail. The testimony of the officer was first taken as to the manner in which the confession was obtained (and *187the manner was about the same as in this case), and the court ruled that the confession was incompetent and should not be introduced in evidence. About the only, difference from this case is that the jury did not hear the confession. It is to be regretted that the court did not follow that case in this respect. The case is not very fully reported, but the principle established seems to be that although the testimony of the confession was incompetent, yet, where the accused offered himself as a witness, he became such, as any other witness, and might be asked whether he made the confession, and, if he denied it, the confession itself might be proved to contradict him by way of impeachment. No other reason is given. The case is unsatisfactory, and we cannot follow it. The confession was rejected ■because it was extorted. It was unfair to the accused, and should not be proved against him, and is condemned by the court and ruled out. "When the defendant was asked if he made that confession, and denied it, the same witnesses who extorted the confession, and whose testimony was disallowed on that account, are allowed to testify to the confession, however wickedly or wrongly it was obtained, on the exceedingly narrow theory that it is not admitted as a confession, but merely to contradict the witness. The confession is allowed to go to the jury, and have its effect in convicting the defendants, and override the ruling of the court that it was inadmissible as evidence against him, and for such a petty reason. The confession is just as objectionable as evidence, and as incompetent and hurtful, when offered in one way as in another. If no other evidence on the ground of contradicting the defendant as a witness could be found, he had better have gone uncontradicted than that his legal rights as a prisoner should be so violated and his conviction obtained by such unlawful testimony. The object is to get the confession in evidence. It cannot be done di/rectly, but it can be done indirectly. It cannot *188be used to convict, but it can be used to contradict, the defendant, and in that way it is used to convict him all the same. We cannot adopt such a principle or practice in the administration of criminal law. It is unreasonable as well as unjust. This evidence was inadmissible on the familiar ground that a witness cannot be cross-examined and contradicted in respect to matters not admissible in evidence as part of the case. Whart. Cr. Ev. sec. 484 That confession first went to the jury and produced its effect as evidence, before it was excluded by the court, and finally goes to the jury as competent evidence by way of contradicting the defendant. It seemed impossible to keep it out, however objectionable or incompetent it was as evidence against the accused. That it was incompetent is not an open question in the case. The court so decided in favor of the defendants.
For the above errors the judgment must be reversed and a new trial ordered.
By the Court.— The judgment of the circuit court is reversed, and the cause remanded for a new trial. The warden of the state prison at Waupun is hereby ordered to deliver the defendants into the custody of the sheriff of the county of Ashland, to be held by him until they are discharged from his custody according to law.