delivered the opinion of the court:
On November 17, 192y, the grand jury of Rock Island county indicted Max Shapiro and Irving Schraeberg, alias Irving Stone, for burning a store building on October 7, 1927. On December 4, 1929, the defendants entered pleas of not guilty to the indictment. Shapiro was represented by Peter R. Ingelson, and nominally, for the purpose of keeping the record during the trial of the case, he was represented by Thomas P. Sinnett. Schraeberg was represented by Thomas P. Sinnett, and, likewise, Ingelson was Schraeberg’s nominal attorney of record. A jury was selected and sworn to try the issue. A number of witnesses testified for the State and several testified for the defense. Schraeberg testified in his own behalf. Two days were consumed in selecting the jury and eleven days were used in producing evidence before the case was submitted to the jury to deliberate upon a verdict. The jurors were unable to agree and they were discharged. On January 6, 1930, the case was again set for trial on January 13, 1930. On January 11 the defendants presented a motion for a continuance. The motion was allowed and the case set for trial on February 24, 1930. On February 8, 1930, after notice to Schraeberg, Sinnett moved the court for leave to withdraw his appearance, and on February 13, 1930, the trial court granted Sinnett’s motion. On February 21, 1930, Shapiro died. His death was suggested by Ingelson on February 24, at which time he withdrew his appearance in the case. Between the 21st and 24th of February Schraeberg (hereinafter referred to as the defendant) came before the court and asked for a continuance on the ground that he had no lawyer and no proper funds. The court advised the defendant that he would appoint a lawyer for him, but the defendant stated that he would wait until Monday (the 24th) and that he would get an attorney of his own. On Monday morning, February 24, 1930, the *622defendant appeared in court in person and asked for a change of venue. The court told him to get a lawyer and present the motion in written form. The defendant employed attorneys Schriver & Schriver chiefly to get a continuance. He requested his attorneys to prepare a petition for a change of venue. They entered a limited'appearance for the purpose of presenting the petition for a change of venue from the presiding judge of the court. The petition was drawn under the provisions of the statute existing prior to July 1, 1929, — i. e., supported by the affidavits of two witnesses, not by the affidavit of the defendant’s attorney in accordance with the requirements of the statute since the amendment of July 1, 1929. The court denied the motion. Schriver & Schriver entered their general appearance and were given until 4 :oo o’clock P. M. to prepare a motion for a continuance. The motion for continuance was presented to the court, and it, too, was denied. The court announced that the case would go to trial the next morning, Tuesday, February 25, 1930, at 9 :oo o’clock. The record discloses that on the morning of February 25, 1930, a plea of guilty was entered by the defendant. The order of the court as transcribed by the clerk recited that on this day came the defendant, Irving Schraeberg, in his own proper person as well as by Thomas P. Sinnett, his counsel; that on motion of the defendant leave of court was granted to withdraw his plea of not guilty heretofore entered and the defendant tendered his plea of guilty of arson in manner and form as charged in the indictment and filed his waiver of trial by jury in writing; that thereupon the defendant was advised by the court that he was entitled to a trial by jury and had the right to have witnesses confront him; that the court further explained to the defendant the consequence and penalty of his plea, and an opportunity was given him to retract his said plea, but he persisted therein, and it was so entered by the court. Thereupon the . court found him guilty of arson in manner and form as *623charged in the indictment and further found his age to be twenty-nine years, and sentence was deferred until April 16, 1930. On April 16, 1930, being one of the days of the January term of said court and the same term that the plea of guilty was interposed, counsel now of record appeared and presented a withdrawal of the appearance of Schriver & Schriver for the defendant and entered their appearance for the defendant. Counsel thereupon presented a motion to make the record speak the truth by expunging those parts of the order of February 25, 1930, wherein it was stated that the defendant “was represented by Thomas Sinnett, his counsel,” and wherein it was further stated “that the defendant was advised by the court that he was entitled to a trial by jury and that he had the right to have witnesses confront him and to be sworn and to testify both on behalf of the State and the defense,” and wherein it was further stated “that the court further explained to the defendant the consequences and penalty of his said plea.” An immediate hearing was requested on this motion, and should the court grant the same the defendant asked leave of court to withdraw his plea of guilty and interpose a plea of not guilty. An immediate hearing was had on said motion.
The first witness called by the defendant was George W. Gamble, the clerk of the court. He testified that there were two indictments pending against the defendant, one the instant case, No. 7255, for arson, and the other, an indictment for conspiracy to commit arson, being indictment No. 7343, returned on September 21, 1928; that nothing had been done in the conspiracy case except to arraign the defendant. The indictment for conspiracy charged the defendant and Max Shapiro with a conspiracy to commit the offense charged in the indictment in this case.
Thomas P. Sinnett testified that at one time he' was attorney of record for both defendants and withdrew his appearance on February 13, 1930. On February 25, 1930, *624he accompanied the defendant to court. The assistant State’s attorney, McNeal, got a jury waiver and filled it out. He further testified: “Schraeberg beckoned to me to come over and said, Ts that a jury waiver ?’ I said, ‘Yes.’ He further asked, Ts it all right to sign that?’ I said, T am not your lawyer; that is your business,’ and I walked back. The court asked how old he was. He said he was twenty-nine years of age. Schraeberg said he wanted to go from Chicago to Joliet on April 16 and did not want to be here, and Mr. McNeal or Ms. Coyle (I don’t remember which) said it would be necessary for him to be here. The court then said: “All right; I will now make this entry: ‘Judgment deferred until April 16th.’” The witness was then asked if he had related everything that transpired on that morning in the court room, and he answered that he did not recall there was anything else said. He did not recall the court stating anything to the defendant on that occasion advising him that on a plea of guilty he was subject to imprisonment in the penitentiary, nor did he recollect the court informing him as to the duration of his sentence on a plea of guilty. He was not appearing as attorney for the defendant that morning and did not see any other counsel before the bar of the court representing or appearing for the defendant. On cross-examination the assistant State’s attorney was permitted to question the witness regarding various conversations on the morning of February 25, 1930, before court convened, wherein the defendant, the defendant’s brother and the assistant State’s attorney discussed the question of a plea and the deferring ©f sentence thereon. Objections interposed to these questions and motions to strike the testimony were overruled by the court.
Harry M. Schriver testified that he saw the defendant for the first time during the noon hour on February 24, 1930. The witness entered a special appearance and presented a petition for a change of venue, which was denied *625about 2 :oo o’clock P. M. He then entered a general appearance and presented the motion for a continuance and affidavit hereinabove set forth. He testified that the allegations in the affidavit were true. The court denied the motion for a continuance and announced that the case would go to trial the next morning at 9 :oo o’clock. He was not in court with the defendant the next morning and did not know whether he had any other counsel or not. He did not perform any services for the defendant at any time after the afternoon of February 24. On cross-examination the witness, over objection of counsel for the defendant, was permitted to relate a conversation between the defendant, the defendant’s brother and the assistant State’s attorney in the office of the latter after court adjourned, out of the presence of the court.
Norman H. Schraeberg, a brother of the defendant, testified that he was in court on the morning of February 25 and heard everything that took place between the court and his brother; that the assistant State’s attorney asked the defendant to sign a paper; that the defendant looked around for somebody, saw Sinnett and called him over and asked him whether to sign; that after that he heard the defendant say something about going direct from Chicago to serve his sentence. The judge asked him how old he was, and he said he was twenty-nine years old. The judge told him to come back on April 16. Nothing else was said to the defendant by the judge or anyone else in the court room on that morning. When asked the question, “Did the judge tell Irving Schraeberg that morning what penalty — what imprisonment — he would have to serve in the event he pleaded guilty?” he answered, “There was nothing said.” On cross-examination the witness testified that while the defendant was out trying to get an attorney the witness and the assistant State’s attorney had a conversation and he asked the assistant State’s attorney what he was going to do with the boy, and that the latter answered: *626“Well, the best thing he can do is to make a plea of guilty; you will be money ahead and you have no chance;”' that, in fact, they had no money, and he asked the assistant State’s attorney to get in touch with his brother; that he talked to his brother and asked him to come over and see the assistant State’s attorney, which he did; that the latter told the defendant, “It is no use to fight; you make a plea of guilty and you will be much better ahead.” He further testified that it was true that his brother was anxious to return to Chicago and did not want to come back to Rock Island the next day, as their mother was sick. He saw the assistant State’s attorney hand the judge a book; that the judge was reading to himself and did not read out loud; that he was standing about ten feet from the judge and his hearing was good.
The defendant was called as a witness and testified that he resided at 2503 North Sacramento avenue, Chicago; that he desired to withdraw his plea of guilty; that he was not guilty and desired a trial by jury; that no one ever told him what the punishment for the crime charged in the particular indictment No. 7255 was until about two weeks after his plea of guilty was entered, when he spoke to Blumenthal, who informed him that it was a penitentiary offense. He further testified that he did not know at that time what the sentence was for that crime; that after Ingelson withdrew on the morning of February 24 he did not have any lawyer and he asked the court for a change of venue; that the court told him to get a lawyer and make his motion in writing; that he thereupon employed Schriver & Schriver, who prepared a petition for a change of venue, which the court denied; that they then filed a general appearance and went back to their office and prepared an affidavit for a continuance; that they did not go into any of the facts in the case at all; that the motion for a continuance was filed about 3 :3o or 4 :oo o’clock and was overruled; that the next morning, February 25, he *627was in court; that the assistant State’s attorney handed him a paper, and on the top he saw the words, “Jury waiver.” After asking Sinnett what it was he signed it and handed it to McNeal, who handed it to the court. A little while later the court asked him how old he was. He answered twenty-nine years. The court was writing, and a little later said, “I find you guilty.” After that he asked the court if he would defer sentence until April 16, as his mother was very sick and was expected to pass away, which request the court granted. He then asked if he could start serving his eleven months from Chicago, and the court told him he would have to be back in the court room on April 16; that the court did not at any time advise him that he would be sentenced to the penitentiary and did not inform him what the penalty was. The State did not offer any evidence to controvert the foregoing testimony.
At the conclusion of the hearing on said motion the court ordered that the record showing that Thomas Sinnett appeared for defendant as his counsel be corrected by expunging the words “as counsel.” The court thereupon made a general statement to the effect that the record of February 25, 1930, spoke the truth, and therefore overruled defendant’s motion to correct the record by expunging therefrom those portions which recited that the defendant was advised by the court that he was entitled to trial by jury and that the court explained to the defendant the consequences and penalty of his plea. The court said that he told the defendant that the penalty was imprisonment in the penitentiary for a term of from one to twenty years. He thereupon sentenced the defendant to a term in the penitentiary at Joliet of not less than one year and not more than ten years.
It is contended by defendant that the court erred in overruling his motion to amend the record to make it speak the truth and to allow him to withdraw his plea of guilty and renew his plea of not guilty. In the view which we *628take of this case it is not necessary for us to determine the details of what took place at the time of the entry of the plea of guilty. It is evident that even if the court did fully explain to defendant the consequences of his plea defendant did not fully understand the explanation, as it is not denied that immediately after entering his plea of guilty he asked the court if he “could start serving his eleven months from Chicago.” It is likewise evident that the court was mistaken in taking for granted that Sinnett was representing defendant on this occasion, and it is apparent that the court did not inquire whether defendant was represented by counsel, where his attorney was, or if he wished to be represented by counsel. He took defendant’s plea of guilty in the absence of the counsel who had represented him the day before. It is also apparent that the court was mistaken as to the charge in the indictment, as upon the hearing of the motion he stated that he informed defendant of the penalty for burning a dwelling house, while the charge was the burning of a store building. He was likewise mistaken as to the penalty. Defendant testified that he did not know as to which indictment he entered his plea of guilty.
While permission to withdraw a plea of guilty and enter a plea of not guilty is a matter within the discretion of the court, yet this is a judicial discretion, which should always be exercised in favor of innocence and liberty. The law favors a trial upon the merits by jury, and all courts should so administer the law and construe the rules of practice as to secure a hearing upon the merits, if possible. The least surprise or influence causing a defendant to plead guilty when he has any defense at all should be sufficient cause to permit a change of the plea from guilty to not guilty. The withdrawal of the plea of guilty should not be denied in any case where it is evident that the ends of justice will be subserved by permitting the plea of not guilty in its stead. People v. Kurant, 331 Ill. 470; People v. *629Lavendowski, 326 id. 173; People v. Walker, 250 id. 427; Krolage v. People, 224 id. 456.
While the motion for a change of venue and the motion for a continuance were not admitted in evidence when offered by the defendant on the hearing of the motion, yet they were a part of the files of the case then on hearing, of which the court took judicial knowledge, and as they are shown by the transcript of the record here, it is proper for us to consider them as tending to show the circumstances under which defendant entered his plea of guilty. That the defendant had a substantial defense upon the merits is evidenced by the length of time consumed on the first trial of the case and by the fact that the jury were unable to agree as to his guilt or innocence. By the denial of his motion for a continuance he was deprived of his constitutional right to appear and defend in person and by counsel. In People v. Blumenfeld, 330 Ill. 474, this court said: "Plaintiff in error assigns as error the action of the court in overruling his motions for a continuance. While it is highly important that justice should be speedily meted out and that criminals should be punished with celerity and dispatch, it is much more important that before punishment should be inflicted upon a person accused of crime full opportunity should be given to place the court in possession of all the facts bearing upon the question of the guilt or innocence of the accused, so that the court and jury may ascertain the truth as to whether or not the person accused is, in fact, guilty of the crime. Section 9 of article 2 of the constitution of this State provides that in all criminal prosecutions the accused shall have the right to appear and defend in person and by counsel. This right includes reasonable time for counsel to prepare the defense. The constitutional guaranty that an accused shall have the assistance of counsel is not a barren right but one of inestimable value to him, and he should not be deprived of it by compelling counsel to go to trial unprepared and with*630out an opportunity of studying the case. If the accused is to have the assistance of counsel, counsel must have adequate time to prepare to render such assistance. (State v. Pool, 50 La. Ann. 449.) A defendant’s right to have counsel and to have his counsel prepare his case for trial is a substantial right, and to deny counsel sufficient time in which to prepare the case is the denial of a substantial right.—Shaffer v. Territory, 127 Pac. 746.”
No attorney could have made a proper defense, under the circumstances shown by this record, within less than twenty-four hours after his employment. Defendant was therefore practically coerced into attempting to make terms with the State’s attorney. He saw the State’s attorney and was advised by him that the best thing he could do was to plead guilty. He pleaded guilty under a misapprehension as to the consequences of his act and under a misapprehension of the court as to the charge and its penalty. The motion was made before sentence, at the same term of court at which the plea was entered. Whether the defense before a jury would have availed defendant is for the present purpose immaterial. The fact that he may be shown, on trial, to be guilty is not, of itself, sufficient to deny him a full opportunity to present to the judge, through counsel, such defense as he may have. It accords with the American spirit of justice to afford such opportunity. (People v. Lavendowski, supra.) Under the facts as shown by this record we are of the opinion that it was an abuse of discretion for the court to deny defendant leave to withdraw his plea of guilty and to enter a plea of not guilty.
The judgment of the circuit court of Rock Island county is reversed and the cause remanded to that court, with directions to set aside the judgment and allow defendant to withdraw his plea of guilty and enter a plea of not guilty.
Reversed and remanded, with directions.