Appellant was charged with cattle theft, and pleaded not guilty, and filed an application for a suspended sentence. After evidence was heard herein appellant withdrew his plea of not guilty, and was by the court allowed to plead guilty to the charge in the indictment, and the jury found him guilty, in response to the court’s charge, and assessed his penalty at confinement in the penitentiary for a term of two years, refusing to suspend his sentence.
We are at a loss to see why the trial court allowed the appellant to withdraw his plea of not guilty after the testimony of the first witness was heard. Ed Tate, the first witness, the man whose cow was alleged to have been stolen by appellant, testified on cross-examination by the appellant’s attorney that appellant was of unsound mind. To the same effect was the testimony of Jesse Gardner, appellant’s father, and also the testimony of J. A. Harrison, the appellant’s employer, and also Ernie Bruton testified to the same substantial effect, that appellant was of unsound mind. At this point the court allowed appellant to withdraw his plea of not guilty and accepted a plea of guilty, whereupon Dr. Sam Barclay, a practicing physician *228and surgeon, was placed upon the stand by the State and testified that, according to his judgment, the appellant was of sound mind, but very timid and shy.
The trial court should not have allowed the withdrawal of the first plea of not guilty, but instead, under the circumstances, should have proceeded under the plea of not guilty and instructed the jury the law in regard to insanity. In fact it was the court’s duty to have entered a plea of not guilty in behalf of the appellant, — in the event appellant desired to plead guilty at any time during the trial, — when it developed in the course thereof that there was an issue as to appellant’s sanity before the jury.
In the Edwards case, 114 S. W. (2d) 572, that was "the course pursued by the learned trial judge, and such a course found sanction in the opinions in the cases of Thompson v. State, 127 Texas Crim. Rep. 494, 77 S. W. (2d) 538; Yantis v. State, 95 Texas Crim. Rep. 541, 255 S. W. 180; Taylor v. State, 88 Texas Crim. Rep. 470, 227 S. W. 679; Harris v. State, 76 Texas Crim. Rep. 126, 172 S. W. 975; Johnson v. State, 120 Texas Crim. Rep. 368, 48 S. W. (2d) 274.
For the error in allowing the appellant to withdraw his plea of not guilty and plead guilty in the presence of testimony showing his insanity, this judgment is reversed and the cause remanded.