
289 N.W.2d 238 (1980)
STATE of North Dakota, Plaintiff and Appellee,
v.
Greg W. GILLEY, Defendant and Appellant.
Cr. No. 666-B.
Supreme Court of North Dakota.
February 28, 1980.
*239 Tom P. Slorby, State's Atty., Minot, for plaintiff and appellee.
Joseph P. Stevens, Minot, for defendant and appellant.
PEDERSON, Justice.
Greg W. Gilley pled guilty to two counts of robbery and five counts of burglary, and was sentenced to ten years in the state penitentiary. Subsequently, Gilley filed an application in the district court for post-conviction relief under the Uniform Post-Conviction Procedure Act, Ch. 29-32, NDCC, alleging that his constitutional rights had been violated. A post-conviction hearing was held, after which relief was denied. Gilley appeals this decision of the district court. We affirm.
Peace officers, in investigating several burglaries in the Minot area, concluded that Gilley was implicated in some of them. Pursuant to a search warrant, the residence where Gilley rented a room was searched. Several items of the stolen property were recovered. An all-points bulletin was then issued for Gilley and he was arrested in the early morning hours on May 7, 1977, at a roadblock near Kenmare, and charged with burglary. He was taken first to the Kenmare Police Department and then transported to the Ward County Jail in Minot, where he remained until he posted bail approximately one week later.
On June 12, 1977, Officer Johnson of the Minot Police Department observed a vehicle which fit the description of one which had been used in a recent armed robbery. The car was stopped, the officers conducted a pat-down search of the four occupants and discovered knives on two of them. A search of the vehicle produced a sawed-off shotgun and a .357 revolver. One of the occupants of the car who was arrested for armed robbery and taken to the Minot Police Department was Greg W. Gilley.
During this confinement, and apparently during his initial confinement as well, Gilley was a discipline problem and was involved in several altercations which resulted in him being maced and placed in an isolation cell to be subdued.
While appearing at a scheduled arraignment on the two robbery charges on June 23, 1977, Gilley requested a court-appointed counsel. The arraignment was continued and counsel was appointed. At counsel's request, Gilley was given a mental competency evaluation at the State Hospital. Gilley was represented by counsel on both the robbery and burglary charges at all subsequent proceedings.
On July 28, 1977, with the advice of counsel, Gilley pled guilty to two counts of robbery and five counts of burglary. On August 3, 1977, Gilley was sentenced to a term of ten years in the State Penitentiary for each of the robberies, and five years for each of the burglaries, with the sentences to be served concurrently.
Gilley, in his petition for post-conviction relief, has raised numerous grounds in contending his constitutional rights were violated. His contentions are (1) that he was not advised of the charges against him before he gave statements concerning the robberies; (2) that the search made of the car in which he was a passenger was not legal; (3) that he requested an attorney before giving a statement after the burglaries and was not provided one; (4) that he was denied effective assistance of counsel; (5) that he was not fully informed as to the consequences of his plea; (6) that the circumstances of his confinement broke down his will; and (7) that the effect of all of the above was to make his plea of guilty involuntary and coerced.
*240 The Uniform Post-Conviction Procedure Act, § 29-32-01, NDCC, provides in relevant part:
"1. Any person who has been convicted of, or sentenced for, a crime and who claims:
. . . . . .
f. That the conviction or sentence is otherwise subject to collateral attack upon any ground of alleged error heretofore available under any common law, statutory or other writ, motion, petition, proceeding, or remedy;
may institute, without paying a filing fee, a proceeding under this chapter to secure relief."
In the instant case Gilley alleges numerous violations of his constitutional rights. However, the general rule is that a voluntary plea of guilty waives all nonjurisdictional defects alleged to have occurred prior to the guilty plea. State v. Barlow, 193 N.W.2d 455 (N.D.1971). The primary question then is whether or not Gilley's plea was voluntarily and intelligently made under the standards prescribed by Rule 11, NDRCrimP. As this court recently said in State v. Gustafson, 278 N.W.2d 358, 362 (N.D.1979), the voluntariness of a plea of guilty involves a constitutional question that is appropriately reviewable under the Uniform Post-Conviction Procedure Act.
Rule 11, NDRCrimP, governs pleas in criminal cases. Under subdivision (b), the court must address the defendant personally and advise him of the nature of the charge, the mandatory minimum and maximum punishment available, his right to plead not guilty, his right to counsel, and that, if he pleads guilty, he waives the right to a trial and the right to confront witnesses against him. The record discloses that the trial judge, before accepting the guilty pleas, carefully advised Gilley of all of the above matters.
"THE COURT: Even though he has informed his client of his constitutional rights, the Court will do so too so there is no question about it.
"The Defendant has been advised of his right to a lawyer, and he has been granted the services of a lawyer. He was informed that if he did not have sufficient funds to retain a lawyer the Court would appoint one on his behalf without cost to him.
"You have the right to a speedy, fair, and public trial by a fair and impartial jury. The verdict of the jury must be unanimous to convict you. At the trial you have the right to meet the witnesses against you face-to-face; that is, to have them testify under oath at a public trial, and you have a right to cross-examine those witnesses.
"You have a right to the processes of the Court to compel the attendance of witnesses to testify in your own behalf. That is, you have a right to have subpoenas issued without cost to you.
"You have a right to not be a witness against yourself; you have the right to remain silent. If you did not take the stand to testify, it would not be held against you in any way.
"This is a Court of record and an appeal may be made from a jury conviction.
"You have the right to plead guilty, or you have the right to plead not guilty. If you plead guilty, you waive your right to a jury trial and you waive your right to be confronted by the witnesses against you.
"Every person is presumed to be innocent and the State must prove the charges against you beyond a reasonable doubt.
"I shall now inform you of the maximum punishment that can be imposed on this offense. This is a Class B Felony and the maximum which may be imposed is 10 years in prison, a fine of $10,000, or both for a Class B Felony. From there it goes downward."
Under subsection (c) of Rule 11, the court is not to accept a plea of guilty without first addressing the defendant to determine that the plea is voluntary and not the result of force or threats or promises apart from a plea agreement. Notwithstanding the acceptance of the plea, the court is not to *241 enter a judgment unless it is satisfied that there is a factual basis for the plea. Rule 11(e), NDRCrimP.
As required, the trial judge questioned Gilley on all of the above matters before accepting his plea of guilty. A relevant part of the examination follows:
"Q In regard to your plea of guilty, was anyone using any persuasion on you, or was this of your own volition?
"A Yes, sir.
"Q Have you made any written statements earlier to the Police Department or to anyone else?
"A Yes.
"Q Was that statement freely made?
"A Yes, sir.
"Q Did anyone use any force or persuasion on you to make such statement?
"A No, sir.
"Q At the present time are you under any kind of drugs?
"A No.
"Q And, of course, you are sober?
"A Yes, sir.
"Q Have you had sufficient time to talk with your lawyer about this before entering your plea?
"A Yes.
"Q Do you feel he is doing his best with you?
"A Yes.
"Q You understand that he is an experienced trial lawyer in Minot?
"A Yes."
Gilley was also questioned about each of the specific charges to determine if there was a factual basis for the plea. Gilley was able to describe with particularity what occurred at each of the robberies and burglaries.
It is clear from the record that Gilley was aware of his constitutional rights and that the trial court did everything it could to assure itself that Gilley's plea was voluntary and intelligently made under the standards prescribed by Rule 11, NDRCrimP.[1]
All Gilley offers us in support of his position are his assertions that his attorney should have realized that he was upset, and that he told his attorney that he would plead guilty to anything to get out of jail. There is nothing in the record to support a claim that Gilley's counsel, in allowing Gilley to plead guilty, was not acting "within the range of competence required of attorneys representing defendants in criminal cases." State v. Hamann, 262 N.W.2d 495, 499 (N.D.1978). The trial judge specifically found that Gilley's assertion that his attorney should have known he was upset was "contrary to the Court's personal observations at the time of petitioner's [Gilley's] pleas and sentencing, when petitioner showed no signs of stress. He appeared calm and freely answered questions put to him by the Court and Counsel." When an accused has adequate representation by counsel and has been made aware of the consequences of his guilty plea, he is in a position to make a free and rational choice among the alternative courses of action open to him. Langdeau v. State of South Dakota, 323 F.Supp. 827, 828 (USDC 1971); North Carolina v. Alford, 400 U.S. 25, 31, 91 S.Ct. 160, 27 L.Ed.2d 162 (1970).
The burden of establishing a basis for post-conviction relief rests upon the petitioning defendant. State v. Iverson, 225 N.W.2d 48 (N.D.1974). Whenever there is contradiction between the record and the unsupported assertion of an accused, the court is compelled to accept the record. State v. Hamann, supra, 262 N.W.2d at 500. We find that Gilley has failed in his proof in that it does not appear from the record of the arraignment or post-conviction hearing that his guilty pleas, with advice of *242 counsel, were not voluntarily and intelligently made. We affirm the judgment denying relief under the Uniform Post-Conviction Procedure Act.
ERICKSTAD, C. J., PAULSON, SAND and VANDE WALLE, JJ., concur.
NOTES
[1]  See generally: United States v. Timmreck, 441 U.S. 780, 99 S.Ct. 2085, 60 L.Ed.2d 634 (1979). Here the defendant, acting on the advice of counsel, pled guilty to a federal drug charge. The district judge determined there was a factual basis for the plea and that it was voluntarily given, but failed to inform the defendant of a mandatory special parole term. The Supreme Court held that the conviction was not subject to collateral attack when all that can be shown is a technical violation of Rule 11.
