
934 P.2d 1238 (1997)
Clint O. NELSON, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 96-51.
Supreme Court of Wyoming.
March 24, 1997.
Sylvia Lee Hackl, State Public Defender, and Donna D. Domonkos, Assistant Appellate Counsel (argued), for Appellant.
William U. Hill, Attorney General, D. Michael Pauling, Senior Assistant Attorney General, and Paul S. Rehurek, Deputy Attorney General (argued), for Appellee.
*1239 Before TAYLOR, C.J., and THOMAS, MACY, GOLDEN and LEHMAN, JJ.
LEHMAN, Justice.
Appellant, Clint O. Nelson, claims the district court violated his constitutional right to court-appointed legal counsel in a probation revocation hearing. The hearing resulted in the court's acceptance of Nelson's previously tendered guilty plea, an adjudication of Nelson's guilt and sentencing for the felony of conspiracy to obtain property by false pretenses.
We reverse.
Nelson states the issue as follows:
Was the appellant denied his Fourteenth Amendment right to due process and his Sixth Amendment right to counsel when the trial court failed to appoint an attorney to represent the appellant at his probation revocation hearing and subsequent sentencing?
The State presents the issue in the form of the following argument:
Appellant was not entitled to the appointment of counsel in his probation revocation proceeding and, in any event, he waived counsel and suffered no prejudice. Any error in failing to appoint counsel was harmless beyond a reasonable doubt.

FACTS
In February 1995, Nelson was charged with a single count of conspiracy to obtain property by false pretenses in violation of W.S. 6-1-303(a) (1988) and W.S. 6-3-407(a)(i) (1988). A public defender was appointed to represent him. A plea agreement was reached wherein Nelson entered a guilty plea, in exchange for which the State recommended to the court that Nelson be placed on probation without conviction pursuant to W.S. 7-13-301 (1995). The court accepted the plea agreement, and further proceedings were deferred. Nelson was placed on supervised probation for not less than one year nor more than five years.
On December 1, 1995, the State filed a petition to revoke Nelson's probation on several grounds. Nelson was arrested that same day. A letter from Nelson to the court was filed on December 4, 1995, in which Nelson requested a court-appointed attorney. Nelson completed an Affidavit in Forma Pauperis, which was also filed on December 4. That day, Nelson appeared before the judge on the motion to revoke probation. During that appearance, the judge informed Nelson:
[Y]ou have a right to be represented by an attorney in this case. But you do not necessarily have the right to be represented by a court-appointed attorney. The only time you have a right to be represented by a court-attorney is if the court finds that allegations are so complex or it's not a simple matter, that due process might require that you be represented by an attorney. I tell you now looking at these allegations, it's the court's observation that they are very simple questions of fact. Either you did or didn't do these things. I don't think the law requires me to appoint an attorney for you in this case, so I would not do that. You do, however, have the right to an attorney of your own choosing and at your own expense, if you want to do that.
Nelson indicated to the judge that he wished to be represented by an attorney. Bond was set, a denial of the allegations was entered, and further proceedings were continued to a later date. The judge instructed Nelson to contact an attorney as soon as possible.
The revocation hearing was set for December 15, 1995. Nelson sent a letter to the prosecuting attorney stating:
I have no means of providing myself with Legal Council [sic], and in light of what the District Judge said, the charges against me are fairly simple, and I do not wish to contest those charges. Therefor [sic], it would not be absolutely necessary for me to have a Legal Council [sic] present.
On December 15, Nelson appeared in court, without counsel, and admitted the allegations contained in the motion to revoke probation. In an order following the revocation hearing, dated December 23, 1995, the court noted that Nelson waived his right to be represented by counsel, accepted Nelson's admissions, entered his guilty plea of record which had previously been tendered to the court, and *1240 adjudged Nelson guilty of the original criminal offense.
On February 6, 1996, Nelson appeared without counsel for sentencing. The court imposed a penitentiary sentence of eighteen to thirty-six months which was suspended in favor of a one-year term of supervised probation. The court ordered Nelson to pay restitution, an assessment to the Crime Victim's Compensation Fund, and the costs of the public defender's representation for his first appearance in 1995.
Nelson timely appeals, contending his constitutional rights were violated by the trial court's failure to provide him with a court-appointed attorney for the probation revocation hearing and subsequent sentencing.

DISCUSSION
The Sixth Amendment provides that "[i]n all criminal prosecutions, the accused shall enjoy the right * * * to have the Assistance of Counsel for his defence." U.S. Const. amend. VI. In Gideon v. Wainwright, the United States Supreme Court held that the Fourteenth Amendment incorporated the Sixth Amendment right to counsel, and accordingly required the states to make appointed counsel available to indigent defendants in all "criminal prosecutions." 372 U.S. 335, 83 S.Ct. 792, 9 L.Ed.2d 799 (1963); Wayne R. LaFave & Jerold H. Israel, Criminal Procedure § 11.1 (2nd ed. 1992). Article 1, § 10 of the Wyoming Constitution likewise provides for the right to counsel in criminal prosecutions and tracks the federal provision. Duffy v. State, 837 P.2d 1047, 1052 (Wyo. 1992); Auclair v. State, 660 P.2d 1156, 1159 n. 6 (Wyo.), cert. denied, 464 U.S. 909, 104 S.Ct. 265, 78 L.Ed.2d 249 (1983).
The Sixth Amendment right to counsel accrues at the time adversary judicial proceedings are initiated against the defendant. Prime v. State, 767 P.2d 149, 152 (Wyo.1989) (citing Kirby v. Illinois, 406 U.S. 682, 92 S.Ct. 1877, 32 L.Ed.2d 411 (1972); Powell v. Alabama, 287 U.S. 45, 53 S.Ct. 55, 77 L.Ed. 158 (1932)). Counsel is required not just at trial, but at "critical stages" both before and after trial in which the substantial rights of the accused may be affected. Duffy, 837 P.2d at 1052 (citing United States v. Wade, 388 U.S. 218, 87 S.Ct. 1926, 18 L.Ed.2d 1149 (1967)); Chavez v. State, 604 P.2d 1341, 1347 (Wyo.1979), cert. denied, 446 U.S. 984, 100 S.Ct. 2967, 64 L.Ed.2d 841 (1980). Wyoming Statute 7-6-104(c)(i) (1995) specifically addresses representation of indigents in probation revocation proceedings. That provision entitles an indigent defendant to representation in a probation revocation proceeding "when it is determined by the court to be statutorily or constitutionally required."
In Gagnon v. Scarpelli, the United States Supreme Court specifically rejected the contention that indigent probationers are entitled to appointed counsel in all probation revocation proceedings. 411 U.S. 778, 787, 93 S.Ct. 1756, 1762, 36 L.Ed.2d 656 (1973). The Court held that a probation revocation hearing was not part of the criminal prosecution when a prison sentence had previously been imposed but then suspended in favor of probation. 411 U.S. at 779-81, 93 S.Ct. at 1758-59. The only issue presented in such a hearing is whether to revoke probation, and that determination is based on defendant's subsequent conduct rather than the commission of the original offense. Id; see also LaFave & Israel, Criminal Procedure § 11.2, at 536-37.
Rule 44(a)(2) of the Wyoming Rules of Criminal Procedure was fashioned to meet the guidelines set out by the Supreme Court in Gagnon to determine when due process may necessitate that counsel be appointed for a probation revocation proceeding. The rule requires the court to appoint counsel if 1) the accused has a colorable claim that he did not violate the conditions of his probation, or 2) there are substantial reasons which justify or mitigate the violation. See Gagnon, 411 U.S. at 790, 93 S.Ct. at 1764. Nelson did not contest the State's allegations that he violated his probation conditions, nor did he claim mitigating circumstances justified the violation. As such, the State submits that the district court acted within the parameters of Rule 44(a)(2) when it declined to appoint counsel to represent Nelson at the revocation hearing.
*1241 However, in Mempa v. Rhay, the Supreme Court held that a probationer is entitled to appointed counsel at a combined revocation and sentencing hearing. 389 U.S. 128, 88 S.Ct. 254, 19 L.Ed.2d 336 (1967). The Mempa court found that sentencing is a critical stage of the criminal proceeding where substantial rights of an accused may be affected. 389 U.S. at 135-37, 88 S.Ct. at 257-58; see also Christy v. State, 731 P.2d 1204, 1206-07 (Wyo.1987). The Gagnon court recognized the limitations established in Mempa and distinguished a probation revocation where a sentence was earlier imposed but then suspended from a probation revocation which also involves sentencing. 411 U.S. at 781, 93 S.Ct. at 1759.
We find Mempa v. Rhay dispositive. The deferred prosecution procedure provided for in W.S. 7-13-301 is similar to the deferred sentencing procedure in Mempa. In both, the proceeding following a probation violation entails more than revoking the defendant's probationthe judge must also impose a sentence for the underlying crime. Although Rule 44(a)(2) limits the circumstances under which the court is required to appoint counsel in a probation revocation proceeding, Mempa holds that the Sixth Amendment entitles a defendant to court-appointed counsel in the specific circumstance when the proceeding includes sentencing. The constitutional requirement controls, and the result is in accord with W.S. 7-6-104, which entitles a needy person to representation when constitutionally required.
The State next contends that Nelson waived his right to counsel when he wrote the prosecuting attorney that it was not "absolutely necessary for [him] to have a Legal Council [sic] present." In addition, the judge asked Nelson at the December 15 hearing if he wished to proceed without an attorney, and Nelson responded that he did. A waiver of a defendant's right to counsel can occur throughout the various stages in the criminal justice process. LaFave & Israel, Criminal Procedure § 11.3. However, to be valid, there must be "an intentional relinquishment or abandonment of a known right or privilege," and the waiver must be knowingly and intelligently made. Van Riper v. State, 882 P.2d 230, 234 (Wyo.1994) (citations omitted). Clearly, Nelson's relinquishment of his right to counsel was based, at least in part, on the judge's ruling at Nelson's December 4 appearance before the court that Nelson was not entitled to court-appointed counsel. Because Nelson did not know he was entitled to court-appointed counsel, any subsequent waiver of that right was invalid.
Finally, the State argues that, if the district court erred in denying Nelson counsel, the error was harmless beyond a reasonable doubt. Harmless error analysis can be applied to most errors of constitutional magnitude. Campbell v. State, 589 P.2d 358, 367 (Wyo.1979); Sullivan v. Louisiana, 508 U.S. 275, 279, 113 S.Ct. 2078, 2081, 124 L.Ed.2d 182 (1993). While we have applied a harmless error analysis in right-to-counsel cases involving evidentiary rulings, this court has noted that an appellant's right to counsel is such a basic right that its denial can never be treated as harmless error. Gentry v. State, 806 P.2d 1269, 1272 (Wyo.1991); Campbell, 589 P.2d at 367 & n. 6 (citing Gideon v. Wainwright, 372 U.S. 335, 83 S.Ct. 792, 9 L.Ed.2d 799 (1963)). Where the right to counsel has been denied at a critical stage of the proceedings, as here, reversal is automatic.

CONCLUSION
The proceeding at issue here was more than a probation revocationit also involved the adjudication of Nelson's guilt of a felony and sentencing. Sentencing is a critical stage of the criminal prosecution, and Nelson was entitled to court-appointed representation pursuant to the Sixth Amendment. Because he was not accorded that right, the Order Accepting Guilty Plea, Entering an Adjudication of Guilt, and Ordering a Presentence Investigation, dated December 23, 1995, and the Order Pronouncing Sentence, dated February 7, 1996, are reversed. This matter is remanded to the district court to conduct the probation revocation hearing in accordance with this opinion.
