
699 P.2d 1332 (1985)
In re The PEOPLE of the State of Colorado
v.
Steven E. LOCKHART.
BOARD OF COUNTY COMMISSIONERS OF JEFFERSON COUNTY, Colorado; Sheriff of Jefferson County, Colorado, Petitioners-Appellants,
v.
John J. PERKO, Acting Executive Director of the Colorado State Department of Corrections; Edward Buckingham, Director of Offender Services, Colorado State Department of Corrections; and James H. Brittain, Superintendent, Colorado Territorial Correctional Facility, Respondents-Appellees.
No. 83SA223.
Supreme Court of Colorado, En Banc.
May 6, 1985.
Rehearing Denied May 28, 1985.
Rehearing Denied June 10, 1985.
*1333 Patrick R. Mahan, Jefferson County Atty., Cile Pace, George D. Theophilos, Asst. Jefferson County Attys., Golden, for petitioners-appellants.
Duane Woodard, Atty. Gen., Charles B. Howe, Chief Deputy Atty. Gen., Richard H. Forman, Sol. Gen., David R. DeMuro, First Asst. Atty. Gen., Human Resources Section, Richard K. Rediger, Asst. Atty. Gen., Human Resources Section, Denver, for respondents-appellees.
DUBOFSKY, Justice.
The Board of County Commissioners of Jefferson County and the Sheriff of Jefferson County (Jefferson County) appeal a Jefferson County District Court dismissal of contempt of court citations issued to officials of the Colorado State Department of Corrections for refusing to accept prisoners committed to the state Department of Corrections by the district court. We affirm the judgment of the district court.
This case arises out of efforts to reduce overcrowding in the Jefferson County jail and the state penitentiary at Canon City. In June 1980 Jefferson County consented to a decree in federal district court that required the county to limit the population of the Jefferson County jail to sixty-five inmates by December 31, 1982, and to build a new jail to house the increasing number of inmates committed to the custody of the county. Consent Judgment and Order, Baker v. Bray, No. 76-M-277 (D.Colo. June 2, 1980). Since August 1981 the Department of Corrections has been operating under a federal district court order to reduce overcrowding and improve conditions in the state correctional system. Ramos v. Lamm, 520 F.Supp. 1059 (D.Colo.1981). The federal court order in Ramos required that no prisoner was to be confined in a cell providing an individual less than sixty square feet of living space, except for inmates confined to the diagnostic unit, who could not be housed there for more than six weeks. Id. at 1062.
Section 16-11-308(2), 8 C.R.S. (1984 Supp.) provides that any person sentenced to a correctional facility "shall initially be confined in the diagnostic center[1] ... to undergo evaluation and diagnosis to determine whether he should be confined in a correctional facility or any other state institution, or whether he should participate in a rehabilitation program as provided by law...." At the hearing on the contempt *1334 citation at issue in this case, Edward T. Buckingham, the Director of Offender Services for the Department of Corrections, testified that the diagnostic unit had space for 120 inmates, and that it was filled to capacity. Buckingham also testified that the diagnostic process generally was completed within a week, but that inmates to be placed in the most secure facilities remained in the unit for six weeks because the number of beds in maximum security was extremely limited, creating an internal backlog.
To comply with the requirements of Ramos, on April 15, 1982, the Department of Corrections notified all Colorado county sheriffs of a new policy of accepting prisoners on a first come, first served basis as space became available in the diagnostic unit. The department's refusal to accept prisoners immediately upon sentencing resulted by early 1983 in 250 to 300 state prisoners being held in Colorado county jails, waiting for space to become available in the diagnostic unit.
Meanwhile, the Jefferson County Sheriff expressed concern to Department of Corrections officials that the number of state prisoners held by Jefferson County increasingly hindered his attempts to comply with the terms of the Jefferson County consent decree.[2] Faced with a January 27, 1983, order to show cause why the federal court should not hold hearings on remedial measures to alleviate chronic conditions of overcrowding in the Jefferson County jail,[3] the sheriff began to transport sentenced state prisoners to the Department of Corrections' diagnostic unit in accordance with the mittimus issued by the sentencing court in each case. The mittimus for each defendant includes the following directive:
THEREFORE, IT IS ORDERED that the Sheriff of Jefferson County shall safely convey the Defendant to the Colorado State Department of Corrections Diagnostic Unit at Canon City, Colorado, to be received and kept as provided by law.
The sheriff's department took four prisoners to the Canon City diagnostic unit on January 28, 1983, six prisoners on January 31, ten prisoners on February 1, and four prisoners on February 2. The Department of Corrections refused to accept each of the prisoners, indicating on each mittimus that there were no beds available at the diagnostic unit.
On February 7, 1983, the county intervened in the criminal cases for twenty-three of the prisoners who were refused admission to the diagnostic unit.[4] The sheriff petitioned the Jefferson County District Court for twenty-three orders to show cause why Department of Corrections officials should not be held in contempt under C.R.C.P. 107[5] for refusal to accept the *1335 prisoners in accordance with the mittimus orders. The court issued the citations to show cause and held a hearing on the consolidated petitions to determine whether the officials should be held in contempt of court. The district court ruled that it had subject matter jurisdiction to hear this C.R.C.P. 107 contempt proceeding; that section 16-11-308(1), 8 C.R.S. (1984 Supp.)[6] imposed a mandatory duty upon the Department of Corrections to receive and keep sentenced prisoners; and that the Department of Corrections did not have the authority to adopt a rule or regulation, such as the first come, first served policy, that had the effect of avoiding its legal duty to accept prisoners under section 16-11-308(1). The Department of Corrections officials did not appeal these rulings, and with the exception of the jurisdictional question,[7] they are not before us for consideration. The district court concluded, however, that the Department of Corrections officials could not be held in contempt of court because the officials did not have the present ability to perform the acts required by the mittimus orders and therefore could not be punished for their failure to perform.
Jefferson County appealed the order of the district court, maintaining that the Department of Corrections did not prove its inability to comply with the sentencing courts' orders, and therefore its officials should have been held in contempt. Although the record is replete with evidence of Jefferson County's attempts to comply with the federal court consent decree and the burden imposed on Jefferson County by the continued housing of state prisoners, the narrow issue before us is whether the record supports the district court's finding that it was impossible for the Department of Corrections to comply with the mittimus orders committing the prisoners to the diagnostic unit. We affirm the judgment of the district court.

I.
The Department of Corrections officials assert that the district court lacks jurisdiction to hold them in contempt of court because they were not officers of the court identified in C.R.C.P. 107(a) as persons whose compliance could be enforced by a contempt proceeding. Generally, state officials who are not parties to a proceeding may not be held in contempt of court. People ex rel. Dunbar v. County Court, 128 Colo. 374, 262 P.2d 550 (1953); People ex rel. Grenfell v. District Court, 89 Colo. 78, 299 P. 1 (1931). The department's argument is based on the holding in Grenfell that a district court did not have subject matter jurisdiction to consider a contempt citation against prison officials for allowing a prisoner six days of freedom three years into an eight to ten year prison term because the prison officials were not officers of the court while executing a sentence imposed on the prisoner. The department also relies on Dunbar. There, a county court had no jurisdiction to find State Home and Training School officials in contempt for refusal to accept immediately an eight-year-old girl committed by the court to the State Home because the officials *1336 were not parties or court officers and were acting under a civil commitment statute that gave them discretion as to when to accept committees to the school.
In the present case, the question is whether prison officials are officers of the court subject to a court order when taking custody of a prisoner under the terms of the district court's mittimus. Currently, the Department of Corrections, under section 16-11-301(1), 8 C.R.S. (1984 Supp.), has authority to determine the appropriate facility for confinement of a prisoner, but the statute requires a court to sentence the offender to the custody of the department.[8] The duty imposed upon a court to sentence and offender to the custody of corrections officials differs from the situation in Grenfell, where the manner of carrying out the prisoner's sentence once he has been taken into custody is within the discretion of corrections officials. The duty imposed upon a court to sentence an offender to the custody of corrections officials also differs from the situation in Dunbar, where the time of acceptance of a person committed to the State Home was left to official determination that suitable living accommodations were available. Here, Department of Corrections officials have a non-discretionary duty to take custody of state prisoners. §§ 16-11-301(1), -308(1), 8 C.R.S. (1984 Supp.).
We determine that corrections officials are officers of the court for the limited purpose of taking custody of prisoners as directed by the mittimus. Otherwise, the court would be without the ability to comply with section 16-11-301(1) and to effectuate the commencement of a prison sentence. Because the district court has jurisdiction to issue the mittimus ordering Department of Corrections officials as officers of the court to take custody of the prisoner, the court also has jurisdiction to enforce that order by a contempt proceeding.

II.
Jefferson County asserts that the district court erred in dismissing the contempt citations on the basis of a finding that the Department of Corrections officials were unable to accept the prisoners as required by the mittimus orders. The county maintains that the record does not support a finding of impossibility because the evidence indicates that there were a few beds available in the state corrections system on each of the days when department officials refused to accept the prisoners.
A court may enter a finding of civil contempt for refusal to obey a court order under C.R.C.P. 107 only if it finds that a party who has a duty to obey a court order and a present ability to obey the order has refused to perform the act required. In re People in the Interest of Murley, 124 Colo. 581, 239 P.2d 706 (1951); In re Marriage of Harris, 670 P.2d 446 (Colo.App.1983); Marshall v. Marshall, 35 Colo.App. 442, 536 P.2d 845 (1975). A party may be held in contempt only for refusal to do exactly what the court order requires. Eatchel v. Lanphere, 170 Colo. 545, 463 P.2d 457 (1970). A party may not be held in contempt for refusal to do that which he is unable to do or that which the court has not ordered him to do.
In the present case, the mittimus orders require that the prisoners be delivered to the diagnostic unit at Canon City and there be accepted into custody of the state Department of Corrections. The record establishes that there were no beds available in the diagnostic unit on January 28, January 31 or February 1, 1983, and *1337 only one bed available on February 2, 1983. Therefore, the record supports the district court's finding that the Department of Corrections was unable to admit the prisoners into the diagnostic unit when the Jefferson County sheriff conveyed them to Canon City in accordance with the mittimus orders.
Jefferson County argues that the district court should have taken into account bed space available at other state corrections facilities when finding that the state did not have the present ability to accept prisoners at the diagnostic unit. As Jefferson County points out, the state Department of Corrections has control over whether beds are available in the diagnostic unit. The department controls transfers among the state corrections facilities and easily could leave enough prisoners in the diagnostic unit to fill all available bed space. However, evidence in the record in this case supports the department's claim that all of the correctional facilities were operating at 100% or more of their functional capacity and thus indicates that the department did not manipulate the transfer of prisoners to raise artificially the population of the diagnostic unit. In the absence of any evidence that the department could have decreased the population of the diagnostic unit, the record supports the finding of the district court that the Department of Corrections was unable to accept the prisoners into the diagnostic unit.
As it was impossible for the Department of Corrections to comply with the mittimus orders and its statutory duty to accept the prisoners at the diagnostic unit, see § 16-11-308(2), 8 C.R.S. (1984 Supp.), the district court correctly held that it could not find the Department of Corrections officials in contempt of court. This determination in no way relieves the state of its duty to accept duly sentenced prisoners.[9]
Judgment affirmed.
NOTES
[1]  Section 17-40-101(1.5), 8 C.R.S. (1984 Supp.) defines "diagnostic center" as "the intake unit at the correctional facilities at Canon City."
[2]  In late 1982 and early 1983, the Department of Corrections, to accommodate Jefferson County's problems, made an exception to its first come, first served policy by accepting 25 prisoners from Jefferson County ahead of prisoners being held in other county jail facilities.
[3]  Jefferson County's return to the order to show cause, filed on February 10, 1983, with the clerk of the federal district court stated:

On Thursday, 2/10/83, at 2:00 p.m., the total number of persons committed or sentenced to Jeffco Jail was 204. The number of state inmates was 32 (29 in-house; 3 out of County). The number of persons actually housed in the Jeffco Jail was 116.
[4]  Although a total of 24 prisoners were transported to the diagnostic unit, the sheriff requested only 23 orders to show cause.
[5]  C.R.C.P. 107 provides in pertinent part:

(a) ... [M]isbehavior of any officer of the court in his official transactions and disobedience or resistance of any person to or interference with any lawful writ, process, order, rule, decree, or command of said court or any other act or omission designated as contempt by the statutes or these rules shall constitute contempt.
. . . . . .
(c) When it appears to the court by motion supported by affidavit that a contempt has been committed out of the presence of the court, it may ex parte order a citation to issue to the person so charged to appear and show cause at a time designated why he should not be punished therefor. The citation and a copy of the motion and affidavit shall be served upon such person a reasonable time before the time designated....
(d) The court shall hear the evidence for and against the person charged and it may find him guilty of contempt and by order prescribe the punishment therefor. A fine may be imposed not exceeding the damages suffered by the contempt, plus costs of the contempt proceeding, plus reasonable attorney's fees in connection with the contempt proceeding, payable to the person damaged thereby. If the contempt consists of the failure to perform an act in the power of the person to perform he may be imprisoned until its performance....
[6]  Section 16-11-308(1), 8 C.R.S. (1984 Supp.) provides: "When any person is sentenced to any correctional facility, that person shall be deemed to be in the custody of the executive director of the department of corrections or his designee."
[7]  Absence of subject matter jurisdiction may be noticed at any stage of an action, including appeal. Denver Urban Renewal Authority v. Byrne, 618 P.2d 1374 (Colo.1980).
[8]  Section 16-11-301(1), 8 C.R.S. (1984 Supp.) provides:

As a general rule, imprisonment for the conviction of a felony by an adult offender shall be served by confinement in an appropriate facility as determined by the executive director of the department of corrections. In such cases, the court will sentence the offender to the custody of the executive director of the department of corrections.
[9]  Jefferson County cites four cases from other jurisdictions to support the argument that a court may require the state to accept prisoners committed to its custody. None of these cases, however, arose in the context of a contempt proceeding. Kanekoa v. Department of Social & Health Services, 95 Wash.2d 445, 626 P.2d 6 (1981), and Maricopa County v. State, 126 Ariz. 362, 616 P.2d 37 (1980), were both mandamus actions in which state courts issued writs requiring state prison officials to fulfill their non-discretionary duty to take custody of state prisoners. In Benjamin v. Malcolm, 528 F.Supp. 925 (S.D.N.Y.1981), a federal court refused a request by New York State to modify a prior judgment requiring the state to take custody of all state prisoners held in overcrowded conditions in New York City. In the fourth case. Gross v. Tazewell County Jail, 533 F.Supp. 413 (W.D.Va. 1982), a federal district court ordered that state prisoners held in the custody of counties would be released if not accepted by the state corrections system. None of these cases addressed the narrow question of whether state officials might be held in contempt for their refusal to accept prisoners. Although contempt was not available as a remedy under the circumstances here, we express no opinion as to the availability of this or another remedy in a different case.
