
560 N.W.2d 198 (1997)
1997 ND 25
STATE of North Dakota, Plaintiff and Appellee,
v.
Joseph M. KLEIN, Defendant and Appellant.
Criminal No. 960146.
Supreme Court of North Dakota.
February 12, 1997.
*199 Jonathan R. Byers, Assistant Attorney General, Bismarck, for plaintiff and appellee.
Wayne D. Goter of Wheeler Wolf, Bismarck, for defendant and appellant.
SANDSTROM, Justice.
[¶ 1] Joseph M. Klein appealed from a district court order denying his motion to withdraw his guilty plea and denying his attorney's motion to withdraw as counsel. We conclude Klein was entitled to withdraw his plea as a matter of right; therefore, the district court erred in denying Klein's motion to withdraw his guilty plea. We further conclude the district court did not abuse its discretion in denying the motion to withdraw as counsel.

I
[¶ 2] On November 29, 1994, Klein was charged with gross sexual imposition. He initially pled not guilty, but entered into a binding plea agreement under which he would change his plea in exchange for a maximum sentence of ten years, with four years suspended if he completed the sex-offender treatment program, the sentence to run concurrently with the sentence he was already serving for another offense.
[¶ 3] At the September 27, 1995, pretrial conference, the district court told Klein:
"[I]f you offer a plea of guilty and I allow you to withdraw your plea of not guilty, that I would hold the plea of guilty in abeyance; in other words, I would not accept the same until I have the presentence investigation in my hands, until I've had a chance to review the same and consider the full content of it...."
[¶ 4] The court questioned Klein and the attorneys. Although he had written letters to the contrary, Klein said he was satisfied *200 with his attorney's representation. After the questioning, the district court stated:
"Very well, I will grant your request conditionally and do herewith strike the not guilty plea as previously offered, and that only upon the condition that the Court accept the plea agreement as described. Based upon the terms and conditions the [sic] of the plea agreement as offered to the Court, let me inquire of you Joseph M. Klein, how do you plead to one count of Gross Sexual Imposition, a class B felony?"
To which Klein responded, "Guilty." After establishing a factual basis, the district court stated:
"It is the order of the Court then that the plea of guilty as offered by the defendant Joseph M. Klein is herewith conditionally accepted. The condition thereof being and it is the order of the Court that the North Dakota Parole and Probation Department complete a presentence investigation ... and submit as part of said presentence investigation ... a recommendation for rehabilitative and therapeutic care of the defendant and a recommendation for registration of the defendant as a sex offender."
[¶ 5] In its post-hearing written order for presentence investigation report, the district court stated: "The Court may accept that [binding plea] agreement, sentence the defendant to something less than the agreement, or reject it entirely." The district court further ordered: "Upon receipt of the Presentence Investigation Report, the Court Administrator's Office is directed to schedule a sentencing hearing for the earliest possible date."
[¶ 6] On January 22, 1996, at Klein's next appearance in courtthe scheduled sentencing after receipt of the presentence report he moved to withdraw his guilty plea, and to change attorneys. After considering the written motions and briefs, the district court, at an April 22, 1996, hearing, denied Klein's motions. The district court stated denial of the motion to withdraw the guilty plea would not subject Klein to a manifest injustice.
[¶ 7] Although the district court never specifically stated it was accepting the plea agreement, it sentenced Klein on May 21, 1996, "pursuant to the plea agreement."
[¶ 8] Klein appeals from the May 21, 1996, judgment of the Emmons County District Court and the May 2, 1996, written order denying Klein's motion to withdraw his guilty plea and the motion to withdraw as counsel.
[¶ 9] Klein argues the district court abused its discretion in denying the motion to withdraw his guilty plea because the plea had not been "accepted" by the court under N.D.R.Crim.P. 32(d)(3); therefore, he was entitled to withdraw his plea as a matter of right. Alternatively, Klein argues even if the plea were "accepted" under N.D.R.Crim.P. 32(d)(3), the district court applied the wrong standard for allowing withdrawal. Specifically, the district court applied the "manifest injustice" standard and not the proper "fair and just" standard.
[¶ 10] The district court had jurisdiction under N.D. Const. Art. VI, § 8, and N.D.C.C. § 27-05-06(1). This Court has jurisdiction under N.D. Const. Art. VI, § 2, and N.D.C.C. § 29-28-06. This appeal is timely under N.D.R.App.P. 4(b).

II
[¶ 11] The standard governing the defendant's right to withdraw a guilty plea is governed by the status of the proceedings. Under N.D.R.Crim.P. 32(d):
"(1) The court shall allow the defendant to withdraw a plea of guilty whenever the defendant, upon a timely motion for withdrawal, proves that withdrawal is necessary to correct a manifest injustice.
"(2) A motion for withdrawal is timely if made with due diligence, considering the nature of the allegations therein, and is not necessarily barred because made subsequent to judgment or sentence.
"(3) In the absence of a showing that withdrawal is necessary to correct a manifest injustice, a defendant may not withdraw a plea of guilty as a matter of right once the plea has been accepted by the court. Before sentence, the court in its discretion may allow the defendant to withdraw a plea for any fair and just reason unless the prosecution has been substantially *201 prejudiced by reliance upon the defendant's plea."

A
[¶ 12] Interpreting N.D.R.Crim.P. 32(d)(3), this Court, in State v. Welch, 356 N.W.2d 147, 149 (N.D.1984), held "a defendant may withdraw a guilty plea as a matter of right before it is accepted by the court." See also State v. Millner, 409 N.W.2d 642, 643 (N.D.1987) ("In addition, a defendant may withdraw a guilty plea as a matter of right before it is accepted by the court, but Millner's attempted withdrawal came after his plea had been formally accepted by the trial court").

B
[¶ 13] After a guilty plea is accepted, but before sentencing, the defendant may withdraw a guilty plea if necessary to correct a manifest injustice, or, if allowed in the court's discretion, for any "fair and just" reason unless the prosecution has been prejudiced by reliance on the plea. N.D.R.Crim.P. 32(d)(3).
[¶ 14] We have previously recognized "[c]ourts and commentators have taken cognizance that Rule 32(d) should be liberally construed in favor of the defendant, and that leave to withdraw a guilty plea before sentencing should be freely granted." Millner at 644 (citing United States v. Punch, 709 F.2d 889, 893 n. 5 (5th Cir.1983); United States v. Russell, 686 F.2d 35, 38 (D.C.Cir. 1982); United States v. Navarro-Flores, 628 F.2d 1178, 1183 (9th Cir.1980); 3 Charles Alan Wright, Federal Practice & Procedure: Criminal 2d § 538, at 199 (1982)). "`Before sentencing, the inconvenience to court and prosecution resulting from a change of plea is ordinarily slight as compared with the public interest in protecting the right of the accused to trial by jury.'" Millner (quoting Kadwell v. United States, 315 F.2d 667, 670 (9th Cir.1963)).

C
[¶ 15] When a court has accepted a plea and imposed sentence, the defendant cannot withdraw the plea unless withdrawal is necessary to correct a "manifest injustice." N.D.R.Crim.P. 32(d)(1); State v. Thompson, 504 N.W.2d 315, 319 (N.D.1993).

D
[¶ 16] After a plea has been accepted, we review a district court's denial of a motion to withdraw a guilty plea for an abuse of discretion. See N.D.R.Crim.P. 32(d)(3); State v. Hobus, 535 N.W.2d 728, 729 (N.D. 1995); State v. Halton, 535 N.W.2d 734, 736 (N.D.1995). "`A trial court abuses its discretion when it acts in an arbitrary, unreasonable, or capricious manner ... or misinterprets or misapplies the law.'" State v. Shepherd, 554 N.W.2d 821, 823 (N.D.1996) (quoting Knudson v. Director, North Dakota Dep't of Transp., 530 N.W.2d 313, 316 (N.D. 1995)); City of Grand Forks v. Dohman, 552 N.W.2d 69, 70 (N.D.1996).

III

A
[¶ 17] N.D.R.Crim.P. 11(d) governs plea agreements. We have recognized N.D.R.Crim.P. 11(d)(1) is like F.R.Crim.P. 11(e)(1). DeCoteau v. State, 504 N.W.2d 552, 558 n. 2 (N.D.1993). Under F.R.Crim.P. 11(e)(1), there are three kinds of plea agreements. "[U]pon the entering of a plea of guilty ... the attorney for the government will do any of the following: (A) move for dismissal of other charges; or (B) make a recommendation, or agree not to oppose the defendant's request, for a particular sentence, with the understanding that such recommendation or request shall not be binding upon the court; or (C) agree that a specific sentence is the appropriate disposition of the case." F.R.Crim.P. 11(e)(1); DeCoteau. The plea agreement in this case was for a specific sentence as described under F.R.Crim.P. 11(e)(1)(C). See N.D.R.Crim.P. 11(d). Under the plea agreement, Klein agreed to ten years in the State Penitentiary, the maximum incarceration period for gross sexual imposition, see N.D.C.C. § 12.1-20-03(3) (classifying gross sexual imposition as a Class B felony); N.D.C.C. § 12.1-32-01(3) (providing a ten-year maximum incarceration period on a Class B felony), to run concurrently with another sentence he was serving. *202 Under the binding plea agreement, four years of the sentence would be suspended on condition that Klein successfully participate in, cooperate with, and complete the sex offender treatment program and, as part of his treatment, admit he committed the offense.

B
[¶ 18] Under N.D.R.Crim.P. 11(d)(2), upon being presented with a binding plea agreement, three options are available:
"[T]he court may accept or reject the agreement, or may defer its decision as to acceptance or rejection until receipt of a presentence report."
[¶ 19] Accepting the guilty plea without accepting the plea agreement is not an option because the plea itself is predicated on the acceptance of the binding plea agreement.
"The viability of the plea agreement controls the viability of the plea. If the former is subject to review of the presentence report, so is the latter. The plea agreement and the plea are `inextricably bound up together' such that deferment of the decision whether to accept the plea agreement carried with it postponement of the decision whether to accept the plea."
United States v. Cordova-Perez, 65 F.3d 1552, 1556 (9th Cir.1995) (quoting United States v. Sanchez, 609 F.2d 761, 762 (5th Cir.1980)).
[¶ 20] Although the words of the district court as to the plea are ambiguous ("conditionally accept," "accept on the condition," and "hold the guilty plea in abeyance"), in the order for presentence investigation, the district court unambiguously states it may reject the plea agreement entirely. Because the plea agreement had not been accepted, the plea based on the agreement could not have been accepted. See State v. McElhaney, 345 N.W.2d 800 (Minn.App. 1984) (where trial court postponed accepting or rejecting the plea and ordered a presentence investigation, the defendant could withdraw his plea as a matter of right); State v. DeZeler, 422 N.W.2d 32, 34 (Minn.App.1988) ("[b]ecause a presentence investigation was ordered, the trial court did not accept the guilty plea immediately"); Thompson v. State, 218 Ga.App. 444, 462 S.E.2d 404 (1995) (defendant "had an unqualified statutory right to withdraw his guilty plea at any time before judgment was pronounced by oral announcement of sentence by the trial court" (emphasis in original)).[1]
[¶ 21] Because the district court in this case clearly deferred acceptance of the plea agreement, the plea could not have been accepted. Klein was entitled to withdraw his plea as a matter of right, and the district court erred in denying his motion.

IV
[¶ 22] Klein obtained court-appointed counsel under N.D.R.Crim.P. 44. Klein argues the district court erred in denying the motion to withdraw as counsel.[2] "[T]he matter of substitution of appointed counsel is committed to the sound discretion of the trial court and, absent a showing of good cause for the substitution, a refusal to substitute is not an abuse of discretion." In Interest of J.B., 410 N.W.2d 530, 532 (N.D.1987).
[¶ 23] At the preliminary hearing, the court asked Klein if he had "any specific complaints of the legal services rendered by" his attorney. Klein responded he did not. The court asked, "[I]s it your desire to have [this attorney] represent you in this proceeding?" Klein responded, "Yes." At the pretrial conference, the court asked Klein if he had "any complaint at this time that you wish to state on the record against [your attorney]." Klein responded, "No." The court continued, *203 "Are you unsatisfied in any manner with [your attorney's] work on your behalf?" Klein responded, "No." Klein indicated he wanted his attorney to continue to represent him.
[¶ 24] The district court found "no indication in the record that [Klein's attorney] failed to adequately represent [him]; in fact, the transcripts contain statements by the defendant that he was satisfied with his counsel and wished him to continue to represent his interests." We conclude the court did not abuse its discretion in denying Klein's attorney's motion to withdraw as counsel.

V
[¶ 25] We affirm the district court's denial of the motion to withdraw as counsel. We reverse and remand for entry of an order allowing withdrawal of the guilty plea.
[¶ 26] VANDE WALLE, C.J., and NEUMANN, MARING, and MESCHKE, JJ., concur.
NOTES
[1]  We do not suggest, when there is a binding plea agreement, a defendant can always withdraw a plea before sentencing. For example, there would be no withdrawal as a matter of right if the court accepted a binding plea agreement and the plea, and ordered a presentence investigation report to help determine what sentence would be imposed within the range permitted under the agreement. See State v. Wahle, 521 N.W.2d 134 (S.D.1994) (applying the "fair and just" standard where the defendant pled guilty under agreement sentencing him to "less than life ... something less than 300 years," and the court clearly agreed to impose a sentence of less than 300 years).
[2]  Court-appointed counsel on appeal is different than court-appointed counsel at trial.
