
170 N.W.2d 448 (1969)
STATE of Minnesota ex rel. James L. PARKS, Appellant,
v.
Ralph H. TAHASH, Warden, Minnesota State Prison, Respondent.
No. 41037.
Supreme Court of Minnesota.
September 5, 1969.
*449 C. Paul Jones, Public Defender, Robert E. Oliphant, Asst. Public Defender, Minneapolis, for appellant.
Douglas M. Head, Atty. Gen., Richard H. Kyle, Sol. Gen., David J. Byron, Asst. Atty. Gen., Dennis O'Brien, Sp. Asst. Atty. Gen., St. Paul, for respondent.
Heard before KNUTSON, C. J., and ROGOSHESKE, SHERAN, PETERSON, and FRANK T. GALLAGHER, JJ.

OPINION
FRANK T. GALLAGHER, Justice.
Appeal from an order of the district court discharging petitioner's writ of habeas corpus brought to compel his release from custody of respondent, warden of the State Prison.
On January 18, 1965, at about 8:30 a. m. a police radio message indicated that a car had been broken into in the area of St. Mary's Hospital in Minneapolis and that doctors' bags had been removed from it. The message included a description of the car driven by the persons involved in the theft and the fact that there were two such persons. Immediately upon receipt of the message, two uniformed officers in a marked patrol car observed a car matching the description. As they began to follow, it picked up speed, and, after calling for assistance and following the car for several blocks, they stopped it.
*450 The occupants were ordered out of the car and were searched. The search of the driver, petitioner in this case, produced only a knife and a credit card. However, the passenger had syringes and a quantity of narcotic drugs in his possession. Following the search of the men, the officers searched the car and found two or three doctors' bags, a loaded .38-caliber revolver, and numerous Bandaids and syringes. No warrant was obtained prior to search of the car. At no time was petitioner informed of his right to remain silent, that what he said could be used against him, or that he had a right to counsel. On the way to the station, petitioner made several voluntary self-incriminating statements relative to the crime for which he was eventually charged.
The only source of information as to what occurred between the time petitioner was delivered to the Minneapolis City Jail at about 9:30 a. m. January 18, 1965, and his arrival, by police ambulance, at the General Hospital emergency room at 2:30 p. m. on January 19 is petitioner's testimony at the habeas corpus hearing. According to his testimony, he was interrogated by officers whose names he cannot remember over a period of time which he estimates to be about 12 hours. During this time his requests to be allowed to contact his family for an attorney were denied. He remembers giving a statement but cannot recall whether he signed a confession. During this period of time, petitioner was suffering from narcotic withdrawal. His memory fails completely as to events following his removal from isolation to an area with other prisoners. His next recollection is of waking up in General Hospital.
Petitioner was released from the hospital and appeared in municipal court on January 22, 1965. At that time he requested a preliminary hearing. On January 27 he was charged by information with unlawful possession of narcotics, arraigned in district court, and entered a plea of not guilty. On February 24, 1965, petitioner again appeared in district court with his attorney, Earl Anderson, for the purpose of withdrawing the not-guilty plea and entering a plea of guilty. After petitioner was examined by Mr. Anderson and the court, the plea of guilty was accepted.
There is a dispute in the evidence as to what occurred between petitioner and Mr. Anderson in the period between January 27 and February 24, and up to the sentencing on March 16, 1965. Petitioner testified he released his other attorney and hired Mr. Anderson on the latter's representation that he could get petitioner acquitted; that Anderson subsequently promised probation, if not acquittal; that petitioner's statement to police could be knocked outthat the statement made chances of acquittal almost niland that, if petitioner pled guilty, hospital treatment would be made available, possibly at Synanon in California. Petitioner also testified that despite early representations as to the illegality of his statement to police there was never any attempt to suppress it or any other evidence. Petitioner stated that he was not advised of his rights as to suppression. He indicated that at the time he pled guilty he understood he would be sent to Synanon after no more than 2 weeks in the workhouse.
Mr. Anderson was called as a witness at the habeas corpus hearing. He testified that all the discussion of possible hospitalization occurred after petitioner had changed his plea to guilty. Anderson stated that he attempted to obtain hospitalization for petitioner, including exploring the possibility of having him selected to go to Synanon. He claimed nothing was said to petitioner about hospitalization prior to the change of plea. He admitted he might very well have told petitioner he probably would be found guilty, but said he had never told a criminal defendant his case was completely hopeless. On the issue of suppression of evidence, Anderson stated that there was some discussion of moving to suppress the physical evidence and statements made to police, but that he was never aware of any written statement taken from petitioner and, at the time of the habeas corpus hearing, *451 had never seen such a statement. No motions to suppress were made because, in his words, "I deemed it advisable not to have a motion to suppress." Anderson denied ever representing to petitioner that he would get him acquitted. As to the change in plea, his recollection was that petitioner simply requested that his plea be changed, without mention of hospitalization.
On March 16, 1965, following a presentence investigation, petitioner was sentenced to the statutory term. However, pursuant to the requests of Mr. Anderson and petitioner himself, the sentence was stayed and petitioner was placed on 5 years' probation, the first year of which was to be served in the Minneapolis Workhouse where petitioner was to avail himself of the medical help available there. On May 25, 1966, petitioner was picked up by the St. Louis Park police in the course of their investigation of a burglary. His physical condition, resulting from the illegal use of narcotic drugs, was such that he required hospitalization. This use of drugs in violation of his probation resulted in its revocation on June 2, 1966, following a hearing in chambers on May 31.
Petitioner filed the application for the present writ on April 25, 1967. A hearing was held on June 12, 1967, and on July 11 the court ordered the writ discharged and dismissed. The court found that petitioner's arrest had been based on probable cause to believe a felony had been committed; that the statements to the arresting officers were admissions in the nature of a confession but were spontaneous and not a result of police interrogation and that any subsequent interrogation which might have occurred did not pertain to the charge and did not influence the plea of guilty; that the plea of guilty was independently and voluntarily entered and was not due to a genuine misapprehension of petitioner's rights; and that petitioner was represented by counsel who acted in a skilled manner in petitioner's best interest. Accordingly, the court ordered the writ discharged.
Petitioner on appeal raises the following two issues: (1) Whether the plea of guilty was the product of a genuine misapprehension of his legal and constitutional rights; and (2) whether he was denied his right to counsel because of incompetent representation.
The difficulty in dealing with allegedly illegal evidence and confessions where there has been a plea of guilty is that none of the material has been used in court against the defendant. This court has considered the problem in several recent cases, and in State ex rel. Drysdale v. Tahash, 278 Minn. 361, 366, 154 N.W.2d 691, 695, set down the following rule:
"* * * In order for the confession to invalidate the conviction, two factors must be present: (1) Defendant was misled as to his constitutional rights with regard to the illegally obtained confession; and (2) defendant's plea of guilty must have been prompted by the existence of the confession."
See, also, State v. Richter, 270 Minn. 307, 133 N.W.2d 537; Chapman v. State, 282 Minn. 13, 162 N.W.2d 698. Both factors raise what are essentially questions of fact.
When asked at the habeas hearing specifically why he pled guilty, petitioner stated:
"Well, to continue, I believe there have been a lot of narcotics arrests in the paper at this time, especially out in Roseville High School. And Earl felt, Mr. Anderson, that it wouldn't help matters, and Judge Tallakson was fair and they were interested in getting me help. I would be convicted if I stood trial. And that is why I plead guilty."
Both petitioner and Mr. Anderson testified that there was at least some consideration between them of possible motions to suppress the physical evidence and the petitioner's statement prior to the change of plea. Therefore it is clear that petitioner was aware that at least in some cases it *452 was possible for evidence taken in by the police to be barred from a trial. However, both men seem to agree that at some point it was decided not to attempt any suppression of evidence. Since there is nothing in the record which would lead us to disagree with the habeas court's conclusion on the admissibility of the evidence, we cannot say that petitioner was acting under a misapprehension of his rights or incompetent advice.
Regarding the question of inducements to plead guilty in the form of promises of hospitalization, there is directly opposing testimony by petitioner and his mother, on the one hand, and Anderson, on the other. Therefore, what remains is a question of fact and we cannot say the finding of the trial court is clearly against the weight of the evidence. Therefore, it must be affirmed. State ex rel. Drysdale v. Tahash, supra.
There is also the matter of petitioner's testimony at the change of plea hearing and sentencing. On those occasions he was questioned by both his attorney and the court and he indicated that his rights had been explained to him as to jury trial and burden of proof required for a conviction and possible penalties to which he was subject. At neither time did petitioner indicate that he was in any way dissatisfied with his attorney or that any inducements had been offered in return for his guilty plea. In fact, as to representations of hospitalization or other help, it should be pointed out that petitioner was given probation, with the first year to be served in the workhouse where he was to take advantage of the medical help available to him. His prior record would normally have precluded such a disposition.
Reviewing the record in its entirety, the pertinent parts of which we have set out herein, we would have to be naive indeed to say that, under the facts and circumstances, petitioner was not involved or that the trial court did not carefully and diligently consider his claims and rights before accepting his plea of guilty.
Affirmed.
