Appellee, Pedro Jackson, is an inmate in the custody of the Florida Department of Corrections (DOC), presently incarcerated at Apalachee Correctional Institution in Sneads, Jackson County, Florida. Jackson entered the custody of the DOC on January 23, 1983, as a transfer from the South Carolina Department of Corrections under the Interstate Corrections Compact, Section 941.55, et seq., Florida Statutes. Jackson was convicted and sentenced in South Carolina on September 1, 1979, for the offense of accessory to armed robbery, for which he received a twenty-year term.
On June 10, 1988, Jackson was erroneously released from custody when Florida officials mistakenly applied Florida gain-time credits to his South Carolina sentence, concluding that Jackson had served his full sentence. Jackson remained out of custody until August 21, 1990, when he either voluntarily returned to the custody of the DOC or was arrested.1 At the time of his erroneous release, appellee had approximately seventeen and one-half months remaining to serve on his South Carolina sentence. Thus, had appellee not been released, his term of incarceration would have expired in early 1990.
On December 12, 1990, appellee filed a petition for writ of habeas corpus in the Circuit Court for the Second Judicial Circuit, Leon County, Florida. Jackson alleged that he was mistakenly released by the DOC, and was entitled to full credit for his time out of custody as well as gaintime relative to that period.2 The DOC, in response, argued that Jackson’s petition should be dismissed for two reasons. First, the DOC asserted that the petition was improperly filed in the Second Judicial Circuit, as Jackson was located within the territory of the Fourteenth Judicial Circuit in Jackson County. Second, even assuming that the court construed the petition as seeking mandamus relief, the circuit court lacked jurisdiction over Jackson’s criminal sentence, which is controlled by laws of the State of South Carolina. Thus, according to the DOC, Jackson’s sole remedy, if any, was to seek recourse through the courts of South Carolina.
On February 20, 1991 the circuit court entered an order construing Jackson’s petition as a request for writ of mandamus3 *282and granting the writ on the ground that South Carolina law was consistent with Florida law in that a prisoner mistakenly-released would be entitled to credit for the period of time he was at liberty.4
The circuit court, however, failed to address the argument that the court was without jurisdiction over Jackson’s criminal sentence pursuant to terms of the Interstate Corrections Compact. We find the DOC’s argument on this point to be well taken and requires that the order appealed from be vacated.
Article IV(c) of the Interstate Corrections Compact, Section 941.56, Florida Statutes, states:
Inmates confined in an institution pursuant to the terms of this compact shall at all times be subject to the jurisdiction of the sending state and may at any time be removed therefrom ... for release on probation or parole, for discharge, ... or for any other purpose permitted by the laws of the sending state ...
§ 941.56, Fla.Stat. (1981) (emphasis added). In addition, article IV(a) of the Interstate Corrections Compact states that the receiving state shall act solely as the agent of the sending state with respect to confinement of inmates of the sending state. § 941.56, Fla.Stat. (1981).
In a somewhat similar case, the Supreme Court of Utah held that Utah (the receiving state) was without jurisdiction to hear an inmate’s habeas petition raising the question whether petitioner should be housed in Utah or Arizona (the sending state). Ellis v. DeLand, 786 P.2d 231 (Utah 1990). In so ruling, the court noted that in light of the agency relationship created by the Compact, the inmate’s habeas petition should have been directed to the appropriate authorities in the sending state. Id. at 232. Alternatively, any hearings on the inmate’s habeas petition may be held in the receiving state only if authorized by the sending state and, if so held, are governed by the laws of the sending state. Id. at 231-232.
Likewise, we hold that pursuant to article IV(c) of the compact the circuit court was without jurisdiction to hear Jackson’s claim that he is entitled to discharge from incarceration. Therefore, the circuit court’s order granting mandamus relief must be vacated. This disposition is without prejudice to appellee to seek relief in the appropriate forum of the State of South Carolina.
ORDER VACATED.
SHIVERS, BOOTH and MINER, JJ., concur.. The record is ambiguous as to this point.
. Under Florida law, when a prisoner is released or discharged from prison by mistake, unless interrupted by violation of parole or some fault of the prisoner, the sentence continues to run while the prisoner is at liberty, and the prisoner’s sentence must be credited with that time. Sutton v. Department of Corrections, 531 So.2d 1009 (Fla. 1st DCA 1988); Carson v. State, 489 So.2d 1236 (Fla. 2d DCA 1986).
.The circuit court ruled that the DOC and its Secretary are headquartered in Tallahassee, within the jurisdiction of the court, and that the relief requested would properly emanate from that office, rather than from the employees of the Apalachee Correctional Institution, where appellee is currently housed.
. We express no view as to the correctness of this statement of law.