
154 N.W.2d 691 (1967)
STATE of Minnesota ex rel. Beryl DRYSDALE, Appellant,
v.
Ralph H. TAHASH, Warden Minnesota State Prison, Respondent.
No. 40621.
Supreme Court of Minnesota.
November 24, 1967.
*692 C. Paul Jones, Public Defender, Ronald L. Haskvitz, Asst. Public Defender, for appellant.
Douglas M. Head, Atty. Gen., Gerard W. Snell, Acting Sol. Gen., David J. Byron, Sp. Asst. Atty. Gen., St. Paul, for respondent.

OPINION
NELSON, Justice.
Appeal from an order entered October 27, 1966, discharging a writ of habeas corpus.
It appears from the record that relator, hereinafter referred to as defendant, was arrested on March 23, 1961, on a charge of drunkenness. Two week later, on April 7, 1961, an information was filed charging him with having had sexual intercourse with his daughter on March 5, 1961, in violation of Minn.St.1961, § 617.13.
During the 3 weeks following defendant's arrest, he was held in jail without access to counsel, and during this time the sheriff *693 of Winona County is alleged to have obtained a confession from defendant which defendant refused to sign until April 17, 1961. It also appears from the record that on that same day defendant was brought into court and counsel was appointed for him. Defendant at that time pled not guilty to the charge of incest and was returned to the county jail.
On April 20, 1961, defendant was again brought before the district court, at which time he withdrew his plea of not guilty and entered a plea of guilty. Defendant contends that during the 3 days following the appointment of Mr. P. S. Johnson as his counsel and up to the time he changed his plea to guilty he only saw Mr. Johnson for about 11 minutes. His counsel, however, states in his deposition that he had from six to eight conferences with defendant before he entered his plea of guilty.
The issue here is whether the existence of an allegedly improperly-obtained confession is of material consideration in determining the voluntariness of defendant's plea of guilty. The charge against defendant of the crime of incest arose out of certain relations defendant had with his daughter, age 13, on March 5, 1961. Following the entry of his plea of guilty, a presentence social, physical, and mental examination was given to defendant pursuant to Minn.St. 246.43. Thereafter, on July 24, 1961, he was sentenced to up to 10 years and committed to the State Prison.
Defendant in the petition for a writ of habeas corpus alleges that a confession was extracted from him in violation of his constitutional rights in that he was held incommunicado for an unreasonable time without assistance of counsel and was subjected to psychological coercion. He also claims that his plea of guilty was improperly induced by promises of his court-appointed counsel that defendant would be placed on probation and that therefore the withdrawal of his plea of not guilty and the entry of his plea of guilty were improperly accepted by the court; that the court did not ascertain the facts surrounding the crime and his participation therein and did not determine whether defendant had made the plea intelligently, with understanding of his rights, and with knowledge of the consequences of such a plea; and that he was denied his right to a preliminary hearing guaranteed him by virtue of § 628.31 and that he did not waive such a right.
Defendant also challenges the jurisdiction of the court, the legality of the sentence, and the use of illegally seized evidence against him, and asserts his right not to be placed twice in jeopardy, his right to be charged by proper indictment or substitute therefor, and his right to a fair and impartial trial.
The habeas court in response to defendant's petition issued a writ. After an evidentiary hearing the court discharged the writ, holding that defendant had not presented any evidence supporting the allegations of the petition.
The record of the proceedings at which defendant entered his plea of guilty show that his attorney stated that he had talked with defendant several times and at great length and had also talked with defendant's wife, and that the court asked defendant if he felt his attorney was competent to act for him, to which inquiry he answered yes. The court thereupon proceeded to read the charge and after reading the charge asked the court-appointed counsel if he believed defendant was in such mental and physical condition as to comprehend the proceedings, to which counsel answered, "I believe he is, Your Honor." The court then asked defendant if he understood the proceedings and defendant answered, "I think so, sir." The court asked, "Do you know? You understand what is happening, don't you?" To this defendant answered, "Yes, sir."
At the evidentiary hearing in the habeas proceedings, defendant stated that he was arrested on March 23 for being intoxicated and that he was charged with incest April 6, 1961, and made a confession which he signed April 17, 1961. He stated also that *694 he held out for 3 weeks and never during this time did he have benefit of counsel. Defendant claimed he was never told of his rights at the time and was never told by his counsel or by the court of his right to a jury trial or any other rights. Defendant also stated that the only reason he pled guilty was the promise of probation and that his confession had nothing to do with the plea of guilty. He also claimed that he did not have intercourse with his daughter and that his attorney lied when he said he conferred at length with defendant, but that he believed his counsel when he made the promise of probation; and that he was satisfied with his attorney and believed and trusted him until he was sentenced.
Defendant did not protest to the trial court about his sentence or the circumstances surrounding it. From the deposition of Mr. Johnson, his counsel, it appears that defendant admitted that he was guilty and never claimed he was innocent. Mr. Johnson said there was talk of probation but that he told defendant that there was not much chance and that he did not promise probation if he pled guilty. Furthermore, defendant never indicated to his counsel that he thought he would get probation. Counsel in his deposition further stated that the plea of guilty was voluntary and that he felt that there was no doubt that defendant knew if he pled not guilty he would be defended by his attorney in a trial.
Defendant admitted in his testimony before the habeas court that his plea of guilty was not prompted by the confession, as is indicated by the following questions and answers:
"Q. You plead guilty because you thought you were going to get probation?
"A. That's right.
"Q. That's the reason?
"A. Yes.
"Q. That's the sole reason?
"A. That's the sole reason.
"Q. So your confession doesn't have anything to do with this matter then, does it?
"A. No."
1. Generally, a conviction following trial or on a plea of guilty based on a confession extorted by violence or by mental coercion is invalid under the Federal due process clause. The United States Supreme Court so held in Com. of Pennsylvania ex rel. Herman v. Claudy, 350 U.S. 116, 76 S.Ct. 223, 100 L.Ed. 126. The Minnesota court has also passed on the effect of an illegally obtained confession on a subsequent plea of guilty. In State v. Clifford, 267 Minn. 554, 555, 126 N.W.2d 258, 259, where the defendant claimed that his plea was prompted by the existence of an illegally obtained confession, we said:
"* * * If he is able to establish prima facie that he did in fact enter a plea of guilty because of a genuine misapprehension of his legal position and his constitutional rights, the [motion to vacate the judgment and withdraw his plea of guilty] will no doubt be granted * * *."
The Clifford case has been explained by this court in a number of subsequent cases, e. g., State v. Richter, 270 Minn. 307, 310, 133 N.W.2d 537, 539, certiorari denied, 382 U.S. 860, 86 S.Ct. 119, 15 L.Ed.2d 98, wherein this court explained that in Clifford our decision "remanded the proceedings for a determination of whether an involuntary confession had prompted the plea." In State v. Hemstock, 276 Minn. 457, 458, 150 N.W.2d 562, 563, this court reiterated the fact that the Clifford case was remanded to determine if "defendant had actually entered a plea of guilty under a misapprehension of his rights."
In State ex rel. Fruhrman v. Tahash, 275 Minn. 242, 247, 146 N.W.2d 174, 178, *695 wherein the defendant was convicted on a plea of guilty, this court held:
"* * * [S]ince defendant has not shown that the confession [alleged by defendant to have been involuntary] formed a basis for his conviction, the issue of its voluntariness appears to be immaterial in the present proceedings."
In United States ex rel. Vaughn v. LaVallee (2 Cir.) 318 F.2d 499, the defendant attempted to have his conviction on a plea of guilty set aside on the grounds that state officials had unlawfully seized certain damaging evidence. There the court held (318 F.2d 500):
"* * * That state officials may have seized his property unlawfully does not in and of itself vitiate his conviction on a plea of guilty, which `is itself a conviction,' rendering unnecessary the introduction of any evidence. [Citation omitted.] Again, there is nothing in the petition to support counsel's suggestion that the appellant pleaded guilty because he was afraid that the seized property would be used in evidence against him."
2. Thus, we think it clear that the general rule is that, while an illegally obtained confession may invalidate a conviction based on a plea of guilty, it is not the mere existence of the confession that will invalidate the conviction. 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.
Defendant's testimony before the habeas court plainly contradicts any claim that his plea of guilty was prompted by the confession.
3. Defendant's only remaining contention is that his court-appointed counsel misled him to believe he would receive probation if he entered a guilty plea. But defendant's counsel has testified that he made no promise of probation and in fact told defendant his chances for probation were not good. Since the testimony on that issue is diametrically opposed, it thus leaves a fact question to be resolved by the trial court below. This court has repeatedly held:
"* * * In the absence of any affirmative showing to the contrary, there is a controlling presumption that court-appointed counsel in a criminal case not only has consulted with his client, the accused, but also has advised him in good faith of his rights in entering a plea of guilty or not guilty." State ex rel. Moriarty v. Tahash, 261 Minn. 426, 429, 112 N.W.2d 816, 819; State v. Waldron, 273 Minn. 57, 70, 139 N.W.2d 785, 795, and cases cited therein.
At the habeas hearing defendant stated that he talked the crime over with his counsel. His counsel in his deposition stated that he acquainted himself with the incident leading to the charge against defendant before the guilty plea was entered and that the details of the crime were discussed during the conferences and that defendant admitted having had sexual relations as charged in the information. Furthermore, defendant made no reference to a promise of probation either at the time of the guilty plea or at the time of the sentencing, or for almost 5 years after the plea was entered.
4. Considering all of the evidence before the habeas court, including defendant's testimony and the record of the proceedings at which the guilty plea was entered, we think it clear that it compels the conclusions that defendant's confession did not form the basis for his plea of guilty, the issue of its voluntariness therefore being of no consequence to his conviction, and, furthermore, that his plea of guilty was made voluntarily with full understanding *696 of the nature of the crime and the consequences of the plea. The trial court was justified in discharging the writ of habeas corpus.
Affirmed.
