
862 A.2d 152 (2004)
Michael GRIFFIN, Petitioner
v.
PENNSYLVANIA DEPARTMENT OF CORRECTIONS, Respondent.
Commonwealth Court of Pennsylvania.
Submitted on Briefs October 15, 2004.
Decided November 22, 2004.
*153 Michael Griffin, petitioner, pro se.
Laura J. Neal, Camp Hill, for respondent.
BEFORE: McGINLEY, Judge, and PELLEGRINI, Judge, and LEADBETTER, Judge.
*154 OPINION BY Judge PELLEGRINI.
Before this Court are preliminary objections in the nature of a demurrer filed by the Commonwealth of Pennsylvania, Department of Corrections (Department) in response to a petition for a writ of mandamus filed by Michael Griffin (Griffin) requesting this Court to direct the Department to recalculate his state sentence to give him credit for time served in a federal correctional institution.
The facts pled are as follows. While on parole from a state prison sentence, Griffin committed further criminal acts which resulted in both state and federal charges. On December 10, 1992, Griffin pled guilty to two state robbery charges. For each conviction, he received a sentence of five to 10 years at a state correctional facility to run concurrently. Griffin also pled guilty to the federal charges, and on May 21, 1993, he was sentenced to 293 months of incarceration and five years of supervised release, which was subsequently reduced to 121 months of incarceration and five years of supervised release purportedly to run concurrent with his state sentence. After being sentenced on his federal charges, federal authorities took custody of Griffin and he was removed to a federal correctional facility.
On September 19, 1994, Griffin returned to the Philadelphia County Court of Common Pleas and pled guilty to two more state robbery charges (at Indictment No. 9109-4329 and Indictment No. 9109-4330), for which he was sentenced to serve five to 10 years on Indictment No. 9109-4329 and 10 to 20 years on Indictment No. 9109-4430. Both of these charges were to be served concurrently with each other and with any other state or federal sentences Griffin was serving at the time. Griffin returned to federal custody after being sentenced on these charges where he remained until April 27, 2001, at which time he was released to a detainer lodged by the Pennsylvania Board of Probation and Parole (Board).
After being returned to state custody, the Board issued a recommitment order assessing Griffin 14 years, six months and one day of backtime on his original state sentence. Based upon the recommitment order, the Department recalculated Griffin's sentence to reflect the completion of his federal sentence on April 27, 2001, and the commencement of his backtime on that same date. The Department also recalculated Griffin's new state sentence to begin running concurrently with his previous sentences after the completion of his backtime.
Claiming that the Department improperly recalculated his sentence and after exhausting his administrative remedies, Griffin filed a petition for review in the nature of a writ of mandamus[1] arguing that the Department failed to credit the time he served in federal prison toward his state court prison terms as provided for in both his federal sentence and his 1994 state court sentence. The Department filed preliminary objections in the nature of a demurrer[2] arguing that Griffin had no *155 clear legal right to the relief requested because a federal court could not order time served in a federal prison to count against state court time, and the 1994 state court sentence could not run against federal time because he had to serve his backtime first.
Section 21.1(a) of the Act commonly known as the Parole Act[3] governs the order in which sentences and backtime are served. Backtime is served before the commencement of the new sentence in two instances: (1) if the parolee was paroled from a state penal institution and the new sentence is to be served in a state penal institution; or (2) if the parolee was paroled from a county penal institution and the new sentence is to be served there. In all other cases, Section 21.1(a) provides that the new sentence is to be served before backtime.[4]
In this case, because Griffin was directed to serve his federal sentence in a federal rather than a state correctional institution, under Section 21.1(a) of the Parole Act, he was required to serve the new federal sentence before he could begin serving the backtime on his original sentence. Additionally, pursuant to Section 21.1(a) of the Parole Act, after being returned to state custody, Griffin was required *156 to begin serving his backtime before the commencement of either of his new state sentences.
The issue in this case then is what effect did the federal court and state court orders have on the calculation of the time Griffin would ultimately have to spend incarcerated because the federal court ordered Griffin's federal sentence to run concurrent with his state sentence, and the state court ordered his 1994 state sentences to run concurrent with each other and with any other state or federal sentence he was serving at the time.
As to his federal sentence being credited against his state court sentence, it is clear that "[a] federal court has no power to direct that a federal sentence shall run concurrently with a state sentence." Gomori v. Arnold, 533 F.2d 871, 875 (3rd Cir.1976), certiorari denied, 429 U.S. 851, 97 S.Ct. 140, 50 L.Ed.2d 125 (1976). Rather, a federal judge may only recommend to the Attorney General that he designate a state institution as the place of service of a federal sentence in order to make it concurrent with a state sentence being served at that institution. See United States v. Devino, 531 F.2d 182 (3rd Cir.1976). In this case, based upon the facts alleged in Griffin's petition for mandamus, the federal judge did not recommend that Griffin serve his federal sentence in a state institution, but rather only designated that his federal sentence be served concurrent to any state sentence. Accordingly, because the federal judge had no power to direct that the time Griffin spent incarcerated in a federal prison would count against his 1992 state sentences,[5] the Department properly concluded that the time Griffin served on his federal sentence should not have been credited against his state time.
This brings us to the second and more difficult issue, i.e., what was the effect of the state court's order that Griffin's 1994 state sentences run concurrent with each other and with any other state or federal sentence Griffin was serving at the time. As to state time running against federal time, Section 9761(b) of the Sentencing Code, 42 Pa.C.S. § 9761(b), provides:
(b) SENTENCES IMPOSED BY OTHER SOVEREIGNS.  If the defendant is at the time of sentencing subject to imprisonment under the authority of any other sovereign, the court may indicate that imprisonment under such other authority shall satisfy or be credited against both the minimum and maximum time imposed under the court's sentence. If the defendant is released by such other authority before the expiration of the minimum time imposed by the court, he shall be returned to a correctional institution of the Commonwealth to serve the time which remains of the sentence. If the defendant is released after the minimum time has elapsed, he shall be considered for parole on the same basis as a prisoner who has served his minimum time in a correctional institution of the Commonwealth. If the defendant is released after the maximum time imposed under the sentence of imprisonment he shall be deemed to have served his sentence.
42 Pa.C.S. § 9761(b). (Emphasis added.)
Based upon the facts alleged in Griffin's petition for mandamus, after pleading guilty to two more state robbery charges in 1994, he received state sentences of five *157 to 10 years and 10 to 20 years to run concurrently with each other and with any other state or federal sentences Griffin was serving at the time. Pursuant to 42 Pa.C.S. § 9761(b), the trial court was authorized to credit any time Griffin spent in federal prison against his new 1994 state sentence.
The Department contends, however, that Section 21.1(a) of the Parole Act required Griffin's backtime to be served before the commencement of his new state sentences. Because he had to serve his approximately 14 years of backtime before he could begin to serve his state sentences, the Department argues that the 1994 state sentences could not run concurrently with his federal sentence, making the trial judge's order that they were to be served concurrently illegal under Section 21.1(a) of the Parole Act.[6]
In Parish v. Horn, 768 A.2d 1214 (Pa.Cmwlth.2001), affirmed, 569 Pa. 45, 800 A.2d 294 (2002), we addressed a similar issue, albeit involving credit for county time. In that case, a parolee was convicted of crimes during his parole period for which he received both a sentence on county charges in July of 1992 and a state sentence approximately three months later. At the state sentencing, the judge ordered that the inmate's state sentence was to run concurrently with any sentence he was serving. As in this case, the Department argued that giving the inmate three months and 20 days credit on his state sentence for the time he served concurrently on his county sentence was the same as allowing him to "serve" a portion of his state sentence before serving his backtime, which was contrary to Section 21.1(a) of the Parole Act. We wrote:
We are guided in this matter by the well-established rule that, if a parolee remains incarcerated prior to trial because he has failed to satisfy bail requirements on new criminal charges, then the time spent in custody shall be credited to his new sentence. See Gaito v. Pennsylvania Board of Probation and Parole, 488 Pa. 397, 412 A.2d 568 (1980); see also section 9760(1) of the Sentencing Code, 42 Pa.C.S. 9760(1). Respondents have cited no law, and we have found none, that prevents us from applying this rule in Gaito to the situation here.
Indeed, we see no difference between a three-month and twenty-day credit for time spent in custody after failing to post bail and a three-month and twenty-day credit for time spent in custody serving a concurrent county sentence. In each instance, there is a valid legal basis other than the new state sentence for the parolee's confinement, viz., failure to meet bail requirements and a *158 previously imposed sentence. Thus, here, for purposes of section 21.1(a) of the Parole Act, Parish is not serving the new state sentence before serving his backtime. Rather, Parish is serving his county time, which, by court order, simultaneously reduces his new state sentence. Indeed, the reality of a concurrent sentence is that by serving one sentence, the inmate receives credit on the other sentence. See section 9761(a) of the Sentencing Code, 42 Pa.C.S. 9761(a).
Parish, 768 A.2d at 1216. (Emphasis added.)
Similarly, for the purpose of Section 21.1(a) of the Parole Act, Griffin is not serving his new 1994 state sentence before serving the backtime on his original sentence. Rather, when Griffin served his federal time, by court order he simultaneously reduced his 1994 sentence because the reality of a concurrent sentence was that by serving one sentence, he received credit on the other sentence. To hold otherwise would take away power from the state sentencing court granted under Section 9761(b) of the Sentencing Code to make state time run concurrently with federal time. Because there is no violation of Section 21.1(a) of the Parole Act, and concurrent sentences were authorized under 9761(b) of the Sentencing Code, under the facts pled, Griffin should have received credit against the time imposed on his 1994 state sentences for the time he served incarcerated in the federal institution on his federal sentence.[7]
Accordingly, we grant in part the Department's preliminary objections in the nature of demurrer only in relation to the federal court's authority to order the time Griffin spent incarcerated in the federal prison to count against his 1992 state sentences.

ORDER
AND NOW, this 22nd day of November, 2004, we grant in part the Pennsylvania Department of Corrections' preliminary objections in the nature of a demurrer only in relation to the federal court's authority to order the time Griffin spent incarcerated in the federal prison to count against his 1992 state sentences.
NOTES
[1]  A writ of mandamus is "an extraordinary remedy which compels official performance of a ministerial act or mandatory duty, as opposed to a discretionary act." Africa v. Horn, 701 A.2d 273, 275 (Pa.Cmwlth.1997). Because the sentence imposed by a court involves a question of law and involves no discretion on the part of the Department, a writ of mandamus will lie to compel the Department to properly compute a prisoner's prison sentence. Saunders v. Department of Corrections, 749 A.2d 553 (Pa.Cmwlth.2000); Doxsey v. Com., Bureau of Corrections, 674 A.2d 1173 (Pa.Cmwlth.1996).
[2]  Preliminary objections in the nature of a demurrer admit as true all well and clearly pleaded material, relevant factual averments and all inferences fairly deductible therefrom. Lindsley v. Robinson, 30 Pa.Cmwlth. 96, 372 A.2d 1258 (1977). However, conclusions of law and unjustified inferences are not so admitted. Id.
[3]  Act of August 6, 1941, P.L. 861, added by Section 5 of the Act of August 24, 1951, P.L. 1401, as amended, 61 P.S. § 331.21a(a). That section gives the Pennsylvania Board of Probation and Parole the discretion to recommit as a parole violator any parolee who is convicted, found guilty or pleads nolo contendre to any crime punishable by imprisonment. If recommitment is so ordered, that section requires the parolee to serve the remainder of the term he or she would have been compelled to serve had he or she not been paroled, giving said parolee no credit for time at liberty on parole. Section 21.1(a) also provides the order in which a parolee who is reconvicted serves his or her backtime and new sentence for the latter crime. It states, in pertinent part:

If a new sentence is imposed upon such parolee, the service of the balance of said term originally imposed shall precede the commencement of the new term imposed in the following cases:
(1) If a person is paroled from any State penal or correctional institution under the control and supervision of the Department of Justice and the new sentence imposed upon him is to be served in any such State penal or correctional institution.
(2) If a person is paroled from a county penal or correctional institution and the new sentence imposed upon him is to be served in the same county penal or correctional institution.
In all other cases, the service of the new term for the latter crime shall precede commencement of the balance of the term originally imposed.
61 P.S. § 331.21a(a). (Emphasis added.)
[4]  Whether backtime can precede commencement of a new term depends upon where the parolee is paroled from and where the new term of confinement is to be served. See Frankhouser v. Pennsylvania Board of Probation and Parole, 147 Pa.Cmwlth. 443, 608 A.2d 595 (1992). When a parolee from a state institution is confined out of state, in a federal correctional institution or in a county correctional institution, that parolee is confined outside the jurisdiction of the Department. See 37 Pa.Code § 71.4(2)(i) ("If a parolee is confined outside the jurisdiction of the Department of Corrections, such as confinement out-of-State, confinement in a Federal correctional institution or confinement in a county correctional institution... Revocation Hearing shall be held within 120 days of the official verification of the Board of the return of the parolee to a State correctional facility.") Because a parolee confined outside the jurisdiction of the Department is clearly not "available" to begin serving backtime for the original offense, any new sentence a parolee is ordered to serve at an institution different from that which he or she was paroled from must precede backtime.
[5]  We note that at the time of Griffin's federal sentencing, May 21, 1993, the only new state sentences Griffin had received were his 1992 state sentences. For that reason, we are not addressing what effect the federal sentencing judge's order had on Griffin's 1994 state sentences.
[6]  The Department cites Commonwealth v. Dorian, 503 Pa. 116, 468 A.2d 1091 (1983) and Doxsey in support of its contention that the sentencing judge's order that Griffin's 1994 sentences run concurrent with the federal sentence is not enforceable because it contradicts the Parole Act. Although in both Dorian and Doxsey, we established that we cannot compel the Department to abide by a sentencing order which is illegal, neither case is on point. In Dorian, we held that a sentencing judge may not impose a sentence on a parole violator for a crime committed while on parole to run concurrently with the time remaining on his original sentence. While Griffin's 1994 state sentence could not run concurrent with the time he had left to serve on his original state sentence, in this case, the issue is what is the effect of Griffin's 1994 state sentences that were ordered to run concurrent with his federal sentence. In Doxsey, we declared that under Pa. R.Crim. P. 1406(c), a sentencing judge cannot direct that a sentence commence on a date prior to the date of sentencing when the defendant is serving time on an unrelated charge. We also note that according to the facts pled, all of Griffin's sentences, except for his original sentence, are related to the same incident.
[7]  Griffin also argues that the Department did not exercise its right of primary jurisdiction (the sovereign which first arrests a defendant has primary jurisdiction over him. Chambers v. Holland, 920 F.Supp. 618, 622 (M.D.Pa.), affirmed, 100 F.3d 946 (3d Cir.1996)), when it had the opportunity in 1992 and 1993. He contends that the Department freely relinquished jurisdiction to the federal authorities in 1993 when it handed him over to federal authorities to begin serving his federal sentence rather than require him to serve his entire state sentence first. If the Department had kept him, he argues, then his federal sentence would run concurrent with his state sentence. The net effect is that if the Department had exercised primary jurisdiction, he would have either served or been eligible for parole on all the "new" state and federal charges after serving approximately 10 years on those sentences, but because he was transferred to the federal authorities, he would have to serve approximately 17 years. He argues that by their own conduct, the Department waived any right to challenge his concurrent sentence. While we are troubled that administrative officials in certain instances, just by deciding whether an inmate is to serve federal or state time first, can determine whether an individual is to serve many years more in prison than the sentencing judges envisioned, we need not address this issue because we have held that he should receive credit for federal time against his 1994 state sentence.
