Opinion by
Appellant contends that the modification of his sentence from one to seven years’ imprisonment to 30 days to seven years’ imprisonment was improper. He argues, accordingly, that the latter sentence is invalid and that the original sentence should be reinstated.
The record explains appellant’s seemingly incredible objection to the reduction of his sentence. Appellant had been convicted of murder in the state of Alabama and sentenced to a term of life imprisonment. At some unspecified date, he escaped from the penal institution where he was incarcerated, and he eventually came to Pennsylvania. On November 20, 1974, Officer LaBorde of the Sandy Township Police Department issued a criminal complaint charging appellant with the theft of an automobile. On March 5, 1975, appellant entered a plea of guilty1 to a charge of theft by unlawful taking.2 Because the stolen property was an automobile, the theft constituted a felony of the third degree,3 punishable by a maximum sentence of seven years.4
*537The record of the sentencing hearing reveals that appellant requested that the maximum term of imprisonment be imposed. Defense counsel informed the trial judge that the reason for this unusual request was appellant’s desire to avoid incarceration in Alabama for as long as possible. The court was also informed that as of March 5, 1975, Alabama had not instituted extradition proceedings. The court agreed to impose a maximum term of seven years, but refused to impose the requested minimum of three and one-half years:
“BY THE COLTRT: You’re asking for three-and-a-half years in prison for stealing a car without any prior record or knowledge of this Court?
“BY THE [ASSISTANT DISTRICT ATTORNEY]: We do have knowledge of a prior record, not of this State, but he is a convicted murderer in the State of Alabama.
“BY THE COURT: That’s Alabama’s problem. Is he out as an escapee or has he been released on parole?
“BY THE [ASSISTANT DISTRICT ATTORNEY]: He’s escaped, Your Honor.
“BY THE COURT: I’ll give Alabama time to extradite him, but I don’t think Pennsylvania should keep him for three-and-a-half years on a stolen car rap.” The court then imposed sentence of one to seven years’ imprisonment, but ordered that exemplified copies of the record and sentence be sent to the Attorney General of the State of Alabama. Six days later, on March 11, 1975, the court was informed that Alabama “wishes the return of the above named defendant ...” The court then revised the sentence it had imposed on March 5, 1975, “to indicate a minimum of thirty (30) days and a maximum of seven (7) years.” Neither appellant nor his counsel were informed of the modification prior to the issuance of the court’s order.
A court has the inherent power to correct an unlawful sentence at any time. See Commonwealth v. *538Cole, 437 Pa. 288, 263 A. 2d 339 (1970).5 The initial sentence imposed in the instant case, however, was within the statutory limits. Generally, a court may exercise its discretion to modify a lawful sentence during the term of court during which the sentence was imposed, or if the term of court expires, within thirty days from the date sentence was entered of record. See, Commonwealth v. Cole, supra; Commonwealth v. Vivian, 426 Pa. 192, 231 A. 2d 301 (1967); Commonwealth ex rel. Taylor v. Myers, 208 Pa. Superior Ct. 417, 222 A. 2d 472 (1966); Commonwealth v. Testa, 203 Pa. Superior Ct. 201, 199 A. 2d 496 (1964); 12 P.S. §1032.6 Thus, the court below had the power to modify the sentence it originally imposed, but in so doing, it was required to comply with the procedure mandated by the legislature: “Provided, That all parties in interest, including the district attorney in criminal cases, are notified in advance of such proposed alteration, modification, suspension, reinstatement, termination, amendment or rescission.” (Emphasis added). A court is empowered to modify a sentence, therefore, only if it notifies the defendant and the district attorney of its intention to do so. In the instant case, the modification was accomplished without regard to the clear requirement of the proviso,7 and, therefore, is without effect.
*539The modification of the judgment of sentence is vacated, and the original sentence is reinstated.