On November 27, 1974, appellant Jeffrey Kent Herold was arraigned on a charge of possession of a controlled substance, and elected to plead guilty. On January 3, 1975, testimony was taken to establish a factual basis for the charge. No petition to withdraw the guilty plea was filed, 1 and appellant was sentenced on February 25, 1975, to a term of one to three years imprisonment. No direct appeal was taken; however, on April 24, 1975, appellant filed a petition under the Post Conviction Hearing Act 2 alleging that his counsel was ineffective in failing to file an appeal challenging (a) the validity of his guilty plea and (b) the legality of his sentence. The lower court, by Order dated June 11, 1975, denied appellant’s petition *174 without granting him a hearing. Appeal was taken to our Court from this Order.
Ordinarily, a defendant who wishes to challenge the validity of his guilty plea must do so by filing with the lower court a petition to withdraw the plea. Commonwealth v. Roberts, supra. The purpose of this rule is to give the lower courts an opportunity to correct errors, if there be any, and thereby possibly avoid unnecessary appeals. Similarly, it would promote judicial economy if defendants were to petition the sentencing courts for correction of allegedly-illegal sentences prior to appealing to the Superior Court. In the case before us, although neither a petition to correct the sentence nor a petition to withdraw the guilty plea was filed, appellant has coupled his arguments with an allegation of ineffective assistance of counsel and has raised the issues in a petition under the Post Conviction Hearing Act. The matter is therefore properly before us at this time.
Although Sections 1180-8 and 4 of the Post Conviction Hearing Act specify that a defendant’s failure to appeal or to raise issues at the proper time gives rise to a rebuttable presumption that such failure was knowing and understanding, our Supreme Court has ruled that an issue may not be finally litigated or waived if the defendant was denied effective assistance of counsel.
Commonwealth v. Musser,
a) that defense counsel was ineffective, or
b) that the guilty plea was invalid and there was no knowing and understanding waiver of the issue of invalidity of the guilty plea,
then the sentence shall be vacated and the appellant granted a new trial.
If on the other hand, the court after the hearing should determine:
a) that defense counsel was effective, and
b) that the guilty plea was valid, or if invalid, that there was a knowing and understanding waiver of the issue of invalidity of the guilty plea,
then the judgment of sentence shall be affirmed, unless the court should determine that the sentence was illegal, in which event the court shall correct the sentence.
Remanded with a procedendo.
Notes
. The events of this case preceded our decision in
Commonwealth
v.
Roberts,
. Act of January 25, 1966, P.L. (1965) 1580, § 1 et seq., 19 P.S. § 1180-1 et seq. (Supp. 1975-76).
