
794 P.2d 877 (1990)
Jerry Ken PREJEAN, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 89-187.
Supreme Court of Wyoming.
June 29, 1990.
Wyoming Public Defender Program, Leonard D. Munker, State Public Defender, Steven E. Weerts, Sr. Asst. Public Defender, Gerald M. Gallivan, Director, Wyoming Defender Aid Program, Thomas J. Alisankus, Student Intern, for appellant.
Joseph B. Meyer, Atty. Gen., John W. Renneisen, Deputy Atty. Gen., Mary B. Guthrie, Sr. Asst. Atty. Gen., for appellee.
Before CARDINE, C.J., and THOMAS, URBIGKIT, MACY and GOLDEN, JJ.
THOMAS, Justice.
The primary question we resolve in this appeal is whether an individual, upon being incarcerated following a violation of parole, is entitled to credit for time that he served as a residential inmate in a community correctional facility. A secondary question that is posed is whether one who is committed to the state penitentiary is entitled to credit for pre-sentence confinement against both the maximum and minimum sentence. The district court, upon sentencing Jerry Ken Prejean (Prejean) after he violated his parole, refused to give him credit for the time served in the community correctional facility and also concluded that he should receive no credit for pre-sentence confinement against either his maximum or minimum sentence. We must reverse and remand the case with instructions to credit Prejean with all of his pre-sentence confinement, including the time served in the community correctional facility, against both the maximum and minimum sentence.
In his brief, as appellant in this case, Prejean articulates the following issues:
"I. Did the district court err in refusing to credit Mr. Prejean's sentence with time served in pre-sentence confinement?
"A. Credit off maximum sentence
"B. Credit off minimum sentence
"II. Did the district court err in refusing to credit Mr. Prejean's sentence with time served at the Community Alternatives detention facility?"
The State of Wyoming, in its Brief of Appellee, prefers this statement of the issues:
"I. The trial court did not abuse its discretion when it did not reduce appellant's minimum and maximum sentences by the amount of time which appellant spent in pretrial detention.
"II. The time which appellant spent at a community correction facility could not have been credited to his sentence."
*878 In June of 1988, Prejean was charged with one felony count of fraud by check in violation of § 6-3-702(a) and (b)(iii), W.S. 1977 (Cum.Supp. 1987). He waived preliminary examination and was arraigned upon the information filed in the district court on June 30, 1988. He then entered a plea of not guilty by reason of mental illness or deficiency and not triable by reason of mental illness or deficiency, and he was referred to the Wyoming State Hospital for an evaluation. Subsequently, on September 28, 1988, Prejean changed his plea to guilty, and he then was sentenced by the district court to a term of not less than four years and not more than seven years in the Wyoming state penitentiary. Imposition of the sentence was suspended, and Prejean was placed on probation for five years, subject to the condition that the first-year probation be served in the community correctional facility in Cheyenne as a residential inmate.
Prejean completed nearly six months at the community correctional facility, but he then failed to return from a furlough. Subsequently, he was apprehended and charged with escape from detention in violation of § 6-5-206(a)(i), W.S. 1977 (June 1983 Repl.). He pleaded guilty to that charge and was sentenced to a term of not less than two years nor more than three years in the Wyoming penitentiary, which was to be served concurrently with any other sentence imposed in Albany County. Thereafter, the District Court of the Second Judicial District, in and for Albany County, revoked Prejean's probation and reimposed the original term of four to seven years without affording credit for pre-sentence confinement or for any time served as a residential inmate in the Cheyenne community correctional facility. Prejean appeals from the sentence.
We can dispose readily of the second claim that presentence confinement[1] should be credited against both the maximum and minimum term. In Renfro v. State, 785 P.2d 491 (Wyo. 1990), this court held unequivocally that, when a sentence to a term of imprisonment is imposed, pre-sentence confinement must be credited against both the maximum term and the minimum term. We recognized that the trial courts could control the time actually served by simply augmenting the maximum and minimum term to encompass pre-trial confinement so long as the statutory maximum term was not exceeded and the appropriate differential maintained between maximum and minimum term. Renfro, and the cases there cited, dispose of this issue and require that Prejean's sentence be reversed so that appropriate credit against both the maximum and minimum terms can be afforded upon resentencing.
Apparently, there is a collateral question with respect to credit for the time spent at the Wyoming State Hospital pending examination. In our view, that time must be included in the pre-sentence confinement time for which credit must be given. That is the effect of Lightly v. State, 739 P.2d 1232 (Wyo. 1987).
The second issue to be addressed is slightly more difficult. We hold, however, that, upon being sentenced to the penitentiary for violation of probation, one who has served time as a resident in a community correctional facility, pursuant to § 7-18-108 or § 7-18-109, W.S. 1977 (June 1987 Repl.), is entitled to credit for that time served. In Peper v. State, 768 P.2d 26, 29 (Wyo. 1989), we held that:
"* * * Although participation in these programs is imposed as a condition of probation, such placement falls within the definition of `official detention' provided in W.S. 6-5-201(a)(ii)." (Emphasis added.)
That holding was reached in an instance in which Peper was charged with escape from detention, and we also noted that "participation in a community correctional program does not constitute `supervision on probation or parole.'" Peper, 768 P.2d at 29 (emphasis added.) Certainly, it was on the basis of Peper that Prejean was *879 charged with, and convicted of, escape from detention.
Our examination of pertinent cases in this area discloses that whether time in a community correctional facility, such as the one to which Prejean was directed as a requirement of his probation, counts as time served if probation is revoked frequently depends, according to the courts, upon whether a charge of escape from detention will lie. See State v. Babcock, 226 Kan. 356, 597 P.2d 1117 (1979). See also Lock v. State, 609 P.2d 539 (Alaska 1980); Nygren v. State, 658 P.2d 141 (Alaska App. 1983); State v. Reyes, 207 N.J. Super. 126, 504 A.2d 43 (A.D. 1986), certification denied 103 N.J. 499, 511 A.2d 671 (1986). Certainly, as Peper establishes, the situation in Wyoming fits that condition.
Consequently, it is our conclusion that, so long as the State of Wyoming continues to provide that:
"(a) An offender or an inmate is deemed guilty of escape from official detention and shall be punished as provided by W.S. 6-5-206(a)(i) if, without proper authorization, he:
"(i) Fails to remain within the extended limits of his confinement or to return within the time prescribed to a community correctional facility to which he was assigned or transferred; or
"(ii) Being a participant in a program established under the provisions of this act he leaves his place of employment or fails or neglects to return to the community correctional facility within the time prescribed or when specifically ordered to do so." § 7-18-112, W.S. 1977 (June 1987 Repl.);
it must accept the concomitant that such time must be counted against a sentence that is later imposed upon violation of probation. This is the thrust of the cases in other jurisdictions.
The judgment of the district court is reversed, and the case is remanded with instructions to resentence Prejean affording him credit against both the maximum and minimum terms imposed for the full time served in pre-sentence confinement including the time served in the community correctional facility and the time spent in the Wyoming State Hospital for examination for mental illness or deficiency.
NOTES
[1]  As used here, "presentence confinement" is simply a condensation of the phrase "presentence confinement incarceration" used in Renfro v. State, 785 P.2d 491, 498 (Wyo. 1990), where it is defined in footnote 8.
