
681 N.W.2d 411 (2004)
STATE of Minnesota, Respondent,
v.
Richard ANYANWU, Appellant.
No. A03-1418.
Court of Appeals of Minnesota.
June 22, 2004.
*412 Mike Hatch, Attorney General, St. Paul, MN; and Amy Klobuchar, Hennepin County Attorney, David C. Brown, Assistant County Attorney, Minneapolis, MN, for respondent.
John M. Stuart, State Public Defender, Richard Schmitz, Assistant Public Defender, Minneapolis, MN, for appellant.
Considered and decided by LANSING, Presiding Judge; WILLIS, Judge; and HUDSON, Judge.

OPINION
HUDSON, Judge.
Appellant Richard Anyanwu challenges his conviction based on a plea agreement that was negotiated with the court, arguing that the district court impermissibly became a direct participant in the plea negotiations. Because the district court erred by improperly injecting itself into the plea agreement negotiations and promising a particular sentence in advance, we reverse and remand.

FACTS
Appellant Richard Anyanwu allegedly shot H.I. while she was seated in her car, in her garage. The state charged Anyanwu with attempted first-degree murder, and first- and second-degree assault. The district court held a plea hearing, in which the state sought the statutory maximum sentence of 240 months. The presumptive guidelines sentence was 180 months. Defense counsel indicated that Anyanwu would plead guilty to all three counts "in a straight plea to the Court with the understanding that the Court would give him a sentence of 210 months in prison." The district court promised Anyanwu a 210-month sentence, noting "The Court is agreeing to, if [Anyanwu] pleads guilty, to give a sentence to the Commissioner of Corrections for 210 months." The prosecutor objected to any disposition other than 240 months in prison and noted, "the record should be clear that this is an agreement between the defense and the Court and that the State is not a party to it." Anyanwu did not object to the district court's promise of a 210-month sentence.
At sentencing, the district court imposed a 210-month sentence, an upward departure of 30 months from the presumptive guidelines sentence. The prosecutor again noted, "This was a straight plea to the Court with an agreed upon sentence of 210 *413 months ... [and] the State does object to a disposition of anything less than 240 months."
Anyanwu did not move to withdraw his guilty plea. Instead, Anyanwu filed this direct appeal.

ISSUES
I. Is a conviction erroneous when it is based on a plea agreement negotiated with the court?
II. Should the departure from the presumptive guidelines sentence be vacated because the state did not give timely notice of its intention to depart from the presumptive guidelines sentence and because the district court erred in failing to file a departure report?

ANALYSIS

I
Anyanwu argues that his conviction should be vacated because the district court impermissibly became a direct participant in the plea negotiations. He asserts that the case must be remanded to a different judge to allow him the opportunity to withdraw his plea. The state concedes that the district court erred in promising a particular sentence in advance, but contends that Anyanwu did not object to this error and has failed to show that the error prejudiced him by affecting his substantial rights.[1] We acknowledge the procedural and substantive irony of an appeal in which the district court granted appellant precisely what he requested. But a defendant has a right to challenge his guilty plea on direct appeal even though he has not moved to withdraw the guilty plea in the district court. State v. Newcombe, 412 N.W.2d 427, 430 (Minn.App.1987), review denied (Minn. Nov. 13, 1987). In addition, a defendant cannot waive the right to appeal a sentence. Ballweber v. State, 457 N.W.2d 215, 218 (Minn.App. 1990). The sentence imposed here, although agreed on by Anyanwu, was an upward departure from the presumptive sentence, which Anyanwu could challenge on appeal. See generally State v. Misquadace, 644 N.W.2d 65, 72 (Minn.2002) (holding a plea agreement by itself may not support a sentencing departure). Although Anyanwu is not directly challenging the sentencing departure here, we conclude that he should not be precluded from challenging the process by which it was imposed. Just as a defendant may invoke the policies of the sentencing guidelines to challenge a sentence to which he has agreed, a defendant should be permitted to vindicate the policies safeguarding the plea bargaining process on appeal even though he has validly entered a plea of guilty.
*414 Furthermore, the case law is clear that a district court should not usurp the responsibility of counsel or become excessively involved in plea negotiations and may not improperly inject itself into plea negotiations. See State v. Johnson, 279 Minn. 209, 215-16, 156 N.W.2d 218, 223 (1968); State v. Moe, 479 N.W.2d 427, 429 (Minn. App.1992), review denied (Minn. Feb. 10, 1992). It is improper for a district court to promise a particular sentence in advance. State v. Vahabi, 529 N.W.2d 359, 361 (Minn.App.1995). Thus, appellant's failure to object to the court as a party to the plea arrangement is not fatal to his claim because the arrangement itself is impermissible.
The state also contends that Anyanwu has not demonstrated any prejudice because his plea was knowing, voluntary, and intelligent, and the record supports the limited upward departure. We agree that Anyanwu's plea was accurate, voluntary, and intelligent. The complaint in this matter indicates that Anyanwu had already confessed to the shooting, and Anyanwu did not make any claim of innocence at the time of the plea or at sentencing. In addition, Anyanwu completed a Rule 15 petition and went through an extensive waiver of his trial rights on the record and affirmed that his plea was voluntary. Moreover, Anyanwu likely benefited from the error because he received a lesser sentence than what the state was recommending to the court. But again, irrespective of any demonstrated prejudice, the law is clear that a guilty plea is per se invalid when the district court impermissibly injects itself into plea negotiations. Moe, 479 N.W.2d at 429-30.
The Minnesota Supreme Court has disapproved of district court participation in plea bargains. See Johnson, 279 Minn. at 215-16, 156 N.W.2d at 223; State v. Nelson, 257 N.W.2d 356, 359 n. 1 (Minn.1977). In Johnson, the Minnesota Supreme Court defined the role of the district court in guilty plea negotiations, noting:
The ultimate judicial responsibility must be to make reasonably certain that a person innocent of any crime has not been improperly induced to plead guilty to a crime. It is likewise a judicial responsibility to protect society against a defendant's being permitted to bargain for a plea excessively lenient for the gravity of the crime apparently in fact committed.... [T]he court should neither usurp the responsibility of counsel nor participate in the plea bargaining negotiation itself.
Johnson, 279 Minn. at 215-16, 156 N.W.2d at 223. The supreme court, however, went on to cite the position taken by the President's Commission on Law Enforcement and Administration of Justice in noting the difficulty of assessing a judge's delicate role with regard to plea bargaining:
[T]he agreed disposition should be openly acknowledged and fully presented to the judge for review before the plea is entered. Inevitably the judge plays a part in the negotiated guilty plea. [The judge's] role is a delicate one, for it is important that [the judge] carefully examine the agreed disposition, and it is equally important that [the judge] not undermine his [or her] judicial role by becoming excessively involved in the negotiations themselves.... The judge's role is not that of one of the parties to the negotiation, but that of an independent examiner to verify that the defendant's plea is the result of an intelligent and knowing choice and not based on misapprehension or the product of coercion.
Johnson, 279 Minn. at 216 n. 11, 156 N.W.2d at 223 n. 11 (quotations omitted).
When a district court injects itself into plea negotiations, it has removed *415 itself from the role of an "independent examiner" of the plea negotiations and has stepped into the position of "one of the parties to the negotiation" by becoming "excessively involved in the negotiations themselves." Id. Anytime a district court improperly injects itself into plea negotiations the guilty plea is per se invalid. See Moe, 479 N.W.2d at 429-30 (reversing a sentence when the state appealed because the district court participated directly in the plea negotiations without finding that the state was prejudiced as a result of the court's participation in the negotiations). We are not suggesting that any involvement by a district court judge in a plea negotiation is improper. We recognize that a district court judge has a delicate role in a plea negotiation and necessarily plays a part in any negotiated guilty plea. We also recognize that the court in this case may well have been imposing a sentence that it thought was appropriate to the offense. But here, the district court directly and unequivocally promised the defendant a particular sentence in advance, and forced the plea bargain on the prosecutor over the prosecutor's objections. By doing so, the district court stepped into the position of one of the parties to the negotiation, over the objection of the prosecutor, and abandoned its role as an independent examiner. Therefore, Johnson and Moe compel us to reverse Anyanwu's conviction and remand the case to allow Anyanwu the opportunity to withdraw his guilty plea.

II
In his pro se supplemental brief, Anyanwu argues that this court should vacate the upward departure from the presumptive sentence because the state did not give timely notice of its intention to seek a departure from the presumptive sentence and because the district court did not file a departure report. We need not address these issues because we reverse on the district court's error in improperly injecting itself into the plea negotiations by promising Anyanwu a particular sentence in advance.

DECISION
The district court erred by improperly injecting itself into the plea agreement negotiations and promising a particular sentence in advance. By doing so, the district court abandoned its independent role and became an advocate. Accordingly, we reverse Anyanwu's conviction and remand the case for reassignment to a different district court judge to allow Anyanwu the opportunity to withdraw his guilty plea.
Reversed and remanded.
NOTES
[1]  The state also argues that the appeal should be dismissed because Anyanwu did not comply with the procedural requirements for withdrawing his guilty plea (i.e., bringing a petition for post-conviction relief or filing a timely motion to the trial court to withdraw his guilty plea). But a defendant who challenges a judgment of conviction against him based on an invalid guilty plea may seek a post-conviction hearing from the district court or may appeal directly to this court. Brown v. State, 449 N.W.2d 180, 182-83 (Minn.1989). "Post-conviction proceedings are the proper forum for presentation and evaluation of matters not of record supporting withdrawal of a guilty plea." State v. Schaefer, 374 N.W.2d 199, 201 (Minn.App.1985). But a direct appeal is appropriate when the record contains factual support for the defendant's claim and when no disputes of material fact must be resolved to evaluate the claim on the merits. See Alanis v. State, 583 N.W.2d 573, 577 (Minn.1998); State v. Newcombe, 412 N.W.2d 427, 430 (Minn.App.1987), review denied (Minn. Nov. 13, 1987). Anyanwu bases his challenge entirely on matters in the record, and no material fact disputes exist; therefore, Anyanwu properly appeals his judgment of conviction directly to this court.
