The facts of this case are set forth in the Appeals Court’s decision, Commonwealth v. Christian, 46 Mass. App. Ct. 477 (1999). The defendant sought to challenge an order revoking his probation because of his refusal to sign a document outlining the probationary conditions. The Appeals Court upheld the probation revocation order.
We granted the Commonwealth’s application for further appellate review with respect to the following dictum from the Appeals Court’s decision: “the preferred procedure by which to seek review of [a] revocation of probation is through a motion for release from unlawful restraint under Mass. R. Crim. P. 30(a)[, 378 Mass. 900 (1979)].” Commonwealth v. Christian, supra at 482. We disagree with this statement.
As the Appeals Court noted, id. at 480, a defendant may appeal a probation revocation order. See, e.g., Commonwealth v. Woods, 427 Mass. 169, 169-170 *1023(1998). To do so, the defendant must file a notice of appeal within thirty days of the imposition of the previously suspended sentence. Commonwealth v. White, ante 258, 262 (1999). We believe this is the proper avenue of relief for a defendant raising a challenge to the issuance of a probation revocation order.
Rule 30 (a) of the Massachusetts Rules of Criminal Procedure is captioned “Unlawful Restraint.” It provides that “[w]hoever is imprisoned or restrained of his liberty pursuant to a criminal conviction may at any time, as of right, file a written motion requesting the trial judge to release him or to correct the sentence which he is then serving upon the ground that his confinement or restraint was imposed in violation of the Constitution or laws of the United States or of the Commonwealth of Massachusetts.” This rule was not intended to provide an avenue for plenary appellate review. Instead, it was designed to enable defendants to challenge the legality or the technical basis of a sentence.
The Reporters’ Notes to Mass. R. Crim. P. 30 (a), Mass. Ann. Laws, Criminal Procedure 292 (Lexis 1997), point out that the rule “permit[s] a convicted defendant to seek release from illegal confinement or other restraint on his liberty [and] to seek the correction of an illegal sentence.” The rule “consolidates the previously distinct procedures of habeas corpus and writ of error.” Id. at 291. Both of these common-law remedies were separate and distinct from the ordinary appeals process, and existed largely to enable defendants to challenge the technical validity of their sentences. Indeed, as the Reporters’ Notes point out, although the writ of error formerly encompassed allegations of factual error from trial, the rules of criminal procedure now require such allegations to be included in a motion for a new trial under Mass. R. Crim. P. 30 (b), 378 Mass. 900 (1979). Id. at 291-292.
We therefore disagree with the Appeals Court’s assertion that the preferred route for review of a probation revocation order is through rule 30 (a). In fact, a defendant may not use rule 30 (a) to challenge the validity of a probation revocation order. Rule 30 (a) is the appropriate avenue for relief only where the defendant is not challenging the probation revocation order itself, but rather the sentence imposed in consequence of the order. An example would be where the defendant was originally given a three-year suspended sentence, then found in violation of probation, and ordered to serve a four-year term. The defendant could file a rule 30 (a) motion pointing out that the imposition of the four-year sentence was illegal, i.e., beyond the judge’s authority. If the same defendant also wanted to challenge the finding of probation revocation, he or she could do so, but only through a direct appeal. The direct appeal and the rule 30 (a) motion would thus serve distinct purposes, as they were intended to do. Rule 30 (a), like its common-law forebears, habeas corpus and writ of error, was intended to be distinct from an ordinary appeal. This is why a rule 30 (a) motion may be filed at any time, unlike an ordinary appeal seeking plenary review of alleged trial court errors.
For the foregoing reasons, we disagree with the Appeals Court’s statement that a rule 30 (a) motion is the preferred avenue for obtaining review of a probation revocation order. In some circumstances, outlined above, a rule 30 (a) motion may be the appropriate avenue of relief. When a defendant challenges the probation revocation order, however, a direct appeal is the appropriate method of seeking review.
The order revoking probation is affirmed.
So ordered.
Michele R. Moretti for the defendant. Robert C. Cosgrove, Assistant District Attorney, for the Commonwealth.The case was submitted on briefs.