
846 A.2d 191 (2004)
Randy STALLSMITH, Petitioner
v.
PENNSYLVANIA DEPARTMENT OF CORRECTIONS, Respondent.
Commonwealth Court of Pennsylvania.
Submitted on Briefs January 30, 2004.
Decided April 5, 2004.
*192 Dennis V. Williams, Erie, for petitioner.
Michael J. McGovern, Camp Hill, for respondent.
BEFORE: FRIEDMAN, Judge, LEADBETTER, Judge, and KELLEY, Senior Judge.
OPINION BY Judge LEADBETTER.
Before this Court is an application for summary relief sounding in mandamus filed contemporaneously with a petition for review by inmate Randy Stallsmith.[1] Stallsmith is seeking credit for 352 days he spent incarcerated in the Erie County prison and requests this court to order the Department of Corrections (DOC) to rescind its decision failing to apply that credit and to recompute his sentence to reflect credit for time served from October 23, 2000 to October 9, 2001.
Currently, Stallsmith is serving two to four years in the State Correctional Institution at Camp Hill. On August 20, 1999, Stallsmith was charged with, among other crimes, Fleeing or Attempting to Elude a Police Officer, Resisting Arrest, and violating the Controlled Substance Act.[2] On February 2, 2000, the Erie County Court of Common Pleas (common pleas) gave Stallsmith a "split sentence" of six to twelve months in the Erie County prison followed by one year of probation for Fleeing or Attempting to Elude a Police Officer. On May 24, 2000, common pleas gave Stallsmith a "split sentence" of six to twelve months in the Erie County prison followed by one year of probation for Resisting Arrest. He also received a sentence of six to twelve months for violating the Controlled Substance Act, which sentence was to run concurrent to his sentence for Resisting Arrest. Stallsmith served the incarcerative portion of his sentences and then began serving the probationary portion of his sentences.
On October 9, 2001, common pleas resentenced Stallsmith for violating his probation with respect to the above crimes. Common pleas sentenced Stallsmith to one to two years for violating his probation with regard to the crime of Resisting Arrest, with this sentence to run consecutively to the one to two years that it gave him for violating his probation with respect to the crime of Fleeing or Attempting to *193 Elude a Police Officer. Common pleas further resentenced Stallsmith to six months to one year for violating his probation with respect to the crime of violating the Controlled Substance Act. This sentence was to run concurrent with his sentence for violating his probation with respect to the crime of Resisting Arrest and was therefore also consecutive to his sentence for violating his probation with regard to the crime of Fleeing or Attempting to Elude a Police Officer. When handing down its sentence as to Fleeing a Police Officer, common pleas ordered that the effective date of the sentence was October 23, 2000, which includes 352 days credit.
The Department of Corrections (DOC) recalculated Stallsmith's minimum date as August 24, 2003 and his maximum date as August 24, 2005. In doing so, it denied him credit for the 352 days he spent incarcerated between October 23, 2000 and October 9, 2001, when common pleas resentenced him. Stallsmith then asked common pleas for relief, which that court denied on March 19, 2002, maintaining that Stallsmith had already received the credit to which he was entitled.[3]
In this regard, common pleas referred Stallsmith to a letter of the Erie County Office of Clerk of Courts, which provided in part:
If you were handed down a split sentence (where you received jail time and probation on the same count) and had that sentence revoked during your probationary period, the D.O.C. will not give you credit for time you served on the jail portion of the sentence.
It is their opinion that the split sentence consists of two separate sentences (one jail and one probation) and if you were serving the probation part of the sentence you cannot have any credit from the jail portion applied to your new revocation sentence because that would amount to double credit.
Letter from the Erie County Office of Clerk of Courts (dated January 31, 2002) (emphasis in original).
On May 23, 2002, Stallsmith again asked for the 352-day credit on a form styled "Inmate's Request to Staff Member." His request was denied on May 29, 2002. Then, on June 10, 2002, Stallsmith filed an official inmate grievance, complaining that his status summary sheet did not reflect the credit of 352 days initially ordered by common pleas. This grievance was denied on June 11, 2002. Thereafter, Vickie Henry, Inmate Records Supervisor, informed Stallsmith, inter alia, that, "it appears that the Court does not apply time spent on the original charge towards the revocation of probation sentence." Official Inmate Grievance Initial Review Response (dated June 13, 2002). On appeal by Stallsmith, his request for credit was again denied. See letter of Superintendent John M. McCullough, Department of Corrections, State Correctional Institution at Houtzdale (dated June 20, 2002).
Stallsmith is now before us, asserting that, under this court's decision in McCray v. Department of Corrections, 807 A.2d 938 (Pa.Cmwlth.2002), he is entitled to a writ of mandamus directed to DOC to restore the 352-day credit common pleas originally granted him.[4] He contends that, otherwise, *194 he would receive "duplicate punishment" in violation of Section 9760(2) of the Sentencing Code, 42 Pa.C.S. § 9760(2)[5] and the Double Jeopardy Clause of the Fifth Amendment to the United States Constitution.
In McCray, inmate Michael McCray filed a petition for review and an application for summary relief seeking credit for time served that was not credited to his later period of incarceration for the same offenses. McCray contended that he had a clear right to relief because DOC's failure to credit him led to double jeopardy violations. In accepting McCray's arguments, this court followed the decision of the Pennsylvania Superior Court in Commonwealth v. Williams, 443 Pa.Super. 479, 662 A.2d 658 (1995).
There, inmate John Williams pled guilty to the crime of attempted theft by unlawful taking and was sentenced to eleven and one-half to twenty-three months of imprisonment, with three years of probation to follow. He served the minimum sentence and then was released on parole. Later, he was adjudicated a convicted parole violator and served the remainder of the twenty-three months to which he was originally sentenced. His probation was continued, but was later revoked following his conviction for another offense. Williams was sentenced to a term of imprisonment of three and one-half to seven years, the maximum sentence permitted, on the attempted theft charge, but was denied credit for the aggregate twenty-three months he had already served on this charge. Williams argued that this twenty-three months should be credited to his three and one-half to seven-year sentence for the same offense. Our sister court agreed, stating:
[T]he 3½ to 7 year term imposed on [revocation of probation] was the maximum sentence allowed by law for that offense. Thus, if appellant is not credited with the 23 months already served, his sentence for attempted theft by unlawful taking would be 65 months (or 5 years and 5 months) to 107 months (or 8 years and 11 months). Clearly this sentence is illegal.
Williams, 662 A.2d at 659. Similarly here, the sentences imposed upon revocation of probation were the maximum allowable for the offense charged, so unless Stallsmith is given credit for the time served, those sentences would be inflated to terms (roughly 1 ½ to 3 years) exceeding the statutory maximum (1-2 years).
DOC argues, relying upon Commonwealth v. Smith, 447 Pa.Super. 502, 669 A.2d 1008 (1996), that upon revocation of probation the sentencing judge retains discretion to impose any lawful term of incarceration. Thus, since DOC's denial of credit was approved by common pleas, its determination that the "violation of probation sentence ... should be treated as if it *195 is a new [i.e., additional] sentence"[6] must be given deference. Whatever weight this argument might otherwise have,[7] it is entirely devoid of merit where, as here, this treatment would result in an aggregate sentence which exceeds the statutory maximum for the offense at issue.
Accordingly, Stallsmith's application for summary relief in the nature of mandamus is granted.

ORDER
AND NOW, this 5th day of April, 2004, IT IS HEREBY ORDERED that the application for summary relief sounding in mandamus filed by Randy Stallsmith in the above captioned matter is hereby GRANTED.
The Department is directed to credit petitioner with the time served in accordance with the foregoing opinion.
NOTES
[1]  By order dated July 23, 2003, this court treated Stallsmith's petition as a petition for review addressed to our original jurisdiction.
[2]  The Controlled Substance, Drug, Device and Cosmetic Act, Act of April 14, 1972, P.L. 233, as amended, 35 P.S. §§ 780-101780-144. The crimes of Fleeing or Attempting to Elude a Police Officer and Resisting Arrest are each classified as a Misdemeanor 2. See Sentencing Guidelines, Title 204 of the Pennsylvania Code, § 303.15. See also Section 1104 of the Crimes Code, 18 Pa.C.S. § 1104, which provides in pertinent part: "A person who has been convicted of a misdemeanor may be sentenced to imprisonment for a definite term which shall be fixed by the court and shall be not more than ... Two years in the case of a misdemeanor of the second degree." Stallsmith's violation of the Controlled Substance Act is classified as a misdemeanor carrying a prison term of not more than one year. See 204 Pa.Code § 303.15; see also Section 13(a)(16) and (b) of the Controlled Substance Act, 35 P.S. § 780-113(a)(16) and (b).
[3]  We are unclear as to what procedural mechanism Stallsmith utilized to obtain this court order.
[4]  We explained in Bright v. Pennsylvania Board of Probation and Parole, 831 A.2d 775, 777-78 (Pa.Cmwlth.2003) (citations omitted):

Mandamus will only be granted to compel performance of a ministerial duty where the plaintiff establishes a clear legal right to relief, a corresponding duty to act by the defendant, and a lack of any other appropriate and adequate remedy.... Mandamus is not proper to establish a legal right, but is only appropriately used to enforce those rights that have already been established.. . . A writ of mandamus will lie to compel the Department of Corrections to properly compute a prisoner's prison sentence. . . .
[5]  This section provides:

Credit against the maximum term and any minimum term shall be given to the defendant for all time spent in custody under a prior sentence if he is later reprosecuted and resentenced for the same offense or for another offense based on the same act or acts. This shall include credit in accordance with paragraph (1) of this section for all time spent in custody as a result of both the original charge and any subsequent charge for the same offense or for another offense based on the same act or acts.
[6]  Official Inmate Grievance Initial Review Response (dated June 13, 2002).
[7]  We note that DOC's argument was accepted by the Superior Court in Commonwealth v. Bowser, 783 A.2d 348 (Pa.Super.2001), petition for allowance of appeal denied, 568 Pa. 733, 798 A.2d 1286 (2002), a case in which the aggregate sentence did not exceed the statutory maximum. However, the McCray panel applied the analysis of the dissenting opinion in Bowser. We need not address that issue here.
