
853 A.2d 409 (2004)
Maurice NEWSUAN a/k/a Melvin Harris, Petitioner
v.
PENNSYLVANIA DEPARTMENT OF CORRECTIONS, et al., Respondents.
Commonwealth Court of Pennsylvania.
Submitted on Briefs March 26, 2004.
Decided July 6, 2004.
*410 Maurice Newsuan, petitioner, pro se.
Timothy A. Holmes, Camp Hill, for respondent.
BEFORE: FRIEDMAN, Judge, and LEADBETTER, Judge, and KELLEY, Senior Judge.
OPINION BY Senior Judge KELLEY.
Before this Court for disposition are the preliminary objections in the nature of a demurrer filed by the Pennsylvania Department of Corrections (Department) to the Petition for Writ of Mandamus (Petition) filed by Maurice Newsuan a/k/a Melvin Harris (Newsuan). For the reasons set forth below, we sustain the Department's preliminary objections.
The facts of this case are as follows. Newsuan is an inmate currently incarcerated in the State Correctional Institution at Pittsburgh (SCI-Pittsburgh). Newsuan has received three sentences. On May 3, 2000, Newsuan was sentenced by the Honorable Peter Rogers (Judge Rogers) of the Court of Common Pleas of Philadelphia County (trial court) to serve a term of incarceration of two to four years for the offense of burglary (First State Sentence). On June 29, 2001, the United States Marshall *411 issued a detainer against Newsuan indicating that he must serve a twenty-one month federal sentence after his release from a State Correctional Institution for the offense of fraud (Federal Sentence); the Federal Sentence was ordered to run consecutively to his First State Sentence. On July 18, 2001, the Honorable M. Teresa Sarmina (Judge Sarmina) of the trial court sentenced Newsuan to a second state sentence to serve a term of incarceration of two to four years for criminal trespass (Second State Sentence). Judge Sarmina ordered the Second State Sentence to run concurrently with Newsuan's Federal Sentence.
The Department then aggregated Newsuan's First State Sentence with his Second State Sentence prior to his release to federal authorities for service of the Federal Sentence. In response to the Department's aggregation of Newsuan's state sentences, Newsuan has filed the Petition in this Court's original jurisdiction. In the Petition, Newsuan requests this Court to compel the Department to release him to the custody of the U.S. Marshall so that he can serve his Second State and Federal Sentences concurrently. The Department responded by filing preliminary objections in the nature of a demurrer to the Petition now before us. The Department objects on the grounds that Newsuan has failed to state a claim upon which relief can be granted as Newsuan is not entitled to mandamus relief directing the Department to release him from state custody prior to completion of service on his state sentences.
In ruling on preliminary objections, we must accept as true all well-pleaded material allegations contained in the petition, as well as all inferences reasonably deduced therefrom. Meier v. Maleski, 167 Pa.Cmwlth. 458, 648 A.2d 595 (1994), aff'd, 549 Pa. 171, 700 A.2d 1262 (1997). The court need not accept as true conclusions of law, unwarranted inferences from facts, argumentative allegations, or expressions of opinion. Id. In order to sustain preliminary objections, it must appear with certainty that the law will not permit recovery, and any doubt should be resolved by a refusal to sustain them. Id.
Mandamus is an extraordinary writ. Bronson v. Board of Probation and Parole, 491 Pa. 549, 421 A.2d 1021 (1980), cert. denied, 450 U.S. 1050, 101 S.Ct. 1771, 68 L.Ed.2d 247 (1981). It will only be granted to compel performance of a ministerial duty where the plaintiff establishes a clear legal right to relief and a corresponding duty to act by the defendant. Waters v. Department of Corrections, 97 Pa.Cmwlth. 283, 509 A.2d 430 (1986). Mandamus is not proper to establish legal rights, but is only appropriately used to enforce those rights which have already been established. Id.
In support of its preliminary objections, the Department argues that Newsuan is not entitled to mandamus relief because the doctrine of primary jurisdiction requires Newsuan to satisfy both state sentences before he can be released to federal authorities to serve his Federal Sentence. We agree.
The doctrine of primary jurisdiction is a means for resolving jurisdictional disputes between the sovereigns. The sovereign which first arrests a defendant has primary jurisdiction over him. Chambers v. Holland, 920 F.Supp. 618, 622 (M.D.Pa.), aff'd, 100 F.3d 946 (3d Cir.1996). Primary jurisdiction remains vested in the sovereign that first arrested the defendant until it relinquishes its priority of jurisdiction by, e.g., bail release, dismissal of the state charges, parole release, or expiration of the sentence. Chambers, 920 F.Supp. at 622 (citing United States v. *412 Warren, 610 F.2d 680, 684-85 (9th Cir.1980) and Roche v. Sizer, 675 F.2d 507, 510 (2d Cir.1982)). Thus, when a federal court and state court each have jurisdiction of a defendant, the doctrine of primary jurisdiction allows the tribunal which first obtained jurisdiction to hold it to the exclusion of the other until the first tribunal's jurisdiction is exhausted. In re Liberatore, 574 F.2d 78, 88 (2d Cir.1978).
When a state has primary jurisdiction, as is the case here, primary jurisdiction over a defendant ends and federal custody over him commences only when the state authorities relinquish him on satisfaction or extinguishment of the state obligation. Chambers, 920 F.Supp. at 622 (citing United States v. Smith, 812 F.Supp. 368, 370 (E.D.N.Y.1993) and Thomas v. Whalen, 962 F.2d 358, 361 n. 3 (4th Cir.1992)). The federal sentence does not commence until the defendant is received into custody at the official detention facility at which the sentence is to be served. 18 U.S.C. § 3585(a); United States v. Pungitore, 910 F.2d 1084, 1118-1119 (3d Cir.1990), cert. denied, 500 U.S. 915, 111 S.Ct. 2009, 114 L.Ed.2d 98 (1991), ("a federal sentence does not begin to run until the defendant is delivered to the place where the sentence is to be served").
The doctrine of primary jurisdiction can be problematic when the defendant receives a state sentence that is to be served concurrently with an existing federal sentence. See, e.g., Commonwealth v. Mendoza, 730 A.2d 503 (Pa.Super.1999). In Mendoza, the defendant pled guilty to state charges for possession with intent to deliver marijuana as part of a plea bargain. At the time of sentencing, the defendant was already serving a federal sentence in a federal penitentiary. The state sentencing court ordered the defendant's state sentence to run "effective today [the day of sentencing]," apparently intending for the defendant's state sentence to run concurrently with his federal sentence in a federal penitentiary. Mendoza. When this did not occur, the defendant petitioned for post-conviction relief in order to withdraw his guilty plea on the basis that his attorney was ineffective in advising the defendant that his federal and state sentences would run concurrently and that such ineffectiveness caused defendant to enter an involuntary and unknowing plea. The Superior Court noted that while the court of common pleas may recommend that a state sentence run concurrently to a federal sentence, the court has no authority to so demand. Mendoza, 730 A.2d at 504, n. 2. "The decision of whether a federal prison in which an appellant is serving his federal sentence may be designated as a place of state confinement is to be made by the Federal Bureau of Prisons" (BOP). Id. (citing Barden v. Keohane, 921 F.2d 476 (3d. Cir.1990)). In other words, "neither the federal court nor the Bureau are [sic] bound in any way by the state court's direction that the state and federal sentences run concurrently." Id. (quoting Barden, 921 F.2d at 477 n. 4, citing U.S. Const. art. VI, cl. 2). Thus, the court of common pleas lacks authority to impose its sentence to run concurrently with an existing federal sentence because only the BOP can designate the federal institution as the place of state confinement.[1]Mendoza.
Applying this analysis to Newsuan's Petition, Newsuan has failed to establish a *413 clear legal right to the relief requested. Although Judge Sarmina may have directed the Second State Sentence to run concurrently with the Federal Sentence, Judge Sarmina lacked authority to demand that these sentences run concurrently. Similarly, the Department does not have the authority, let alone a corresponding duty, to release Newsuan to the custody of the U.S. Marshall until Newsuan's state obligation is satisfied. Thus, having failed to establish the requisite elements for mandamus, Newsuan has failed to state a claim upon which relief can be granted.[2]
Accordingly, the Department's Preliminary Objections are sustained and Newsuan's petition is dismissed.

ORDER
AND NOW, this 6th day of July, 2004, the preliminary objections filed by the Department of Corrections are sustained and Maurice Newsuan's Petition for Writ of Mandamus is dismissed with prejudice.
NOTES
[1]  According to the BOP Program Statement (BOP PS), the BOP "will not, under ordinary circumstances, such as overcrowding in a state institution, accept transfer of the inmate into federal custody for concurrent service." BOP PS § 5160.05(8). Rather, the BOP may designate a state facility as the place of confinement for a federal sentence if deemed appropriate. 18 U.S.C. § 3621(b); BOP PS § 5160.35.
[2]  While we empathize with Newsuan's predicament, it appears that the only way that Newsuan's Second State and Federal Sentences will run concurrently as directed by Judge Sarmina is for Newsuan to petition the BOP for designation of the state prison as the place of confinement for his federal sentence. See BOP PS § 5160.05.
