
540 P.2d 331 (1975)
Rayfield ALEXANDER, Petitioner-Appellant,
v.
Alex WILSON, Warden, Colorado State Penitentiary, Respondent-Appellee.
No. 26498.
Supreme Court of Colorado, En Banc.
September 15, 1975.
Rollie R. Rogers, State Public Defender, James F. Dumas, Jr., Chief Deputy State Public Defender, T. Michael Dutton, Deputy State Public Defender, Denver, for petitioner-appellant.
J. D. MacFarlane, Atty. Gen., Jean E. Dubofsky, Deputy Atty. Gen., John R. Rodman, Asst. Atty. Gen., Denver, for respondent-appellee.
KELLEY, Justice.
This is an appeal from an order entered by the District Court of Fremont County *332 quashing the petitioner's writ of habeas corpus. We affirm.
The petitioner, Rayfield Alexander, was arrested by Colorado state authorities in September, 1970, and charged with two counts of rape in violation of 1971 Perm. Supp., C.R.S.1963,[1] 40-3-401 and two counts of conspiracy to commit rape in violation of 1971 Perm.Supp., C.R.S.1963, 40-2-201.[2] Pending trial on these charges and while released on bond, the petitioner was arrested by federal authorities and charged by information with forgery, altering and publishing counterfeit security in violation of 18 U.S.C. § 495.
On October 16, 1970, the petitioner entered a plea of guilty to the charge contained in the federal information. Shortly thereafter, on October 29, 1970, the petitioner pled guilty in Denver District Court to conspiring to commit rape. For this offense the court sentenced the petitioner to serve eight to ten years in the state penitentiary. The state court remanded the petitioner to the custody of the sheriff who was ordered by a mittimus dated October 29, 1970, to convey the petitioner "with all convenient speed to the penitentiary of the State of Colorado . . . ." However, at this time, a federal detainer had already been lodged against the petitioner. The petitioner was still incarcerated in Denver County Jail when on November 6, 1970, he was sentenced by the United States District Court of Colorado to imprisonment for five years. On November 11, 1970, the petitioner was transported from the Denver County Jail to the United States Penitentiary in Leavenworth, Kansas.
During his incarceration in the federal penitentiary, the petitioner filed a motion in Denver District Court under Crim.P. 35(b), contending that he had not been properly advised when he entered his guilty plea to the state charge. The petitioner was returned to Denver and allowed to withdraw his original plea. Thereupon, the petitioner again pled guilty to the offense of conspiracy to commit rape and was sentenced to serve seven to nine years in the state penitentiary to commence upon completion of the sentence then being served by the petitioner in the federal prison.
Upon completion of his federal sentence, the petitioner was delivered to the Colorado State Penitentiary. Thereafter, the petitioner commenced this action under Crim.P. 35(b), contending that the state had lost jurisdiction of the petitioner when it allowed him to be incarcerated in a federal prison on a sentence imposed subsequent to the state sentence. It was the petitioner's further contention that he had been wrongfully deprived of certain rights that would have accrued to him had he been allowed to serve the state sentence first. The trial court concluded that the petitioner did not have a constitutional right to serve one sentence before the other and on this basis quashed the petitioner's writ of habeas corpus. The petitioner has taken this appeal therefrom.

I.
For purposes of this appeal, the petitioner has reasserted the same arguments offered in the trial court. Essentially, the petitioner argues that:
"because the mittimus of October 23, 1970, was not obeyed, he should either be released by the State of Colorado or be given credit on his Colorado sentence for time served at the federal penitentiary."
Regarding his first contention, the petitioner relies on Alire v. People, 171 Colo. 228, 466 P.2d 78 (1970) to the effect that as a matter of basic fairness, he should be afforded credit against his state sentence for time served in the federal penitentiary.
The defendant in Alire was convicted of a federal offense and while awaiting appeal, he was subsequently convicted of a state offense. The defendant was sentenced by the state court and immediately transferred to the state penitentiary since *333 he was unable to post bond. Later the defendant's bond was reduced and he was released from the state penitentiary. However, pending the appeal of his state conviction, the defendant was arrested by federal marshals and placed in Denver County Jail. A short time thereafter, this court determined that the reduction in bail was invalid and ordered the defendant's immediate return to the state penitentiary. Nevertheless, the defendant remained in the county jail until he was transferred to a federal penitentiary.
Upon completion of his federal sentence, the defendant in Alire was transferred to the state penitentiary to complete serving his Colorado sentence. Although the defendant was afforded full credit against his sentence for the time spent in the federal penitentiary, the defendant filed a petition for writ of habeas corpus, arguing that his state sentence should be commuted as a result of the failure of the state officials to transfer him to the state prison as ordered by this court. In denying the defendant's prayer for relief on appeal, we stated:
"The transfer of the petitioner to the federal penitentiary and back again to the state penitentiary did not result in any unfairness to the defendant. He was given full credit against his Colorado sentence for the time he spent in the federal prison. Had the [defendant] remained in prison in Colorado he would not have been eligible for parole any earlier than he is now. The effect of the transfers has been to make the federal and state sentences run concurrently, a benefit he would not have had had he served out his state sentence before beginning his federal sentence."
As concluded by the trial court below, Alire is not dispositive of the case at bar. The Alire court clearly indicated that the continuation of one sentence without interruption would not entitle the defendant to the benefit of having the state and federal sentences run concurrently. By requesting credit against his state sentence for time spent in federal prison, the petitioner in the instant case is, in effect, arguing that his state and federal sentences should have been imposed concurrent with one another. However, unlike the defendant in Alire, the petitioner here was not subjected to an interrupted sentence. From the time the petitioner was placed in Denver County, he was under a federal detainer. The detainer and the transfer of the petitioner to the federal penitentiary amounted to an imposition of the federal sentence before the state sentence. As stated in Alire,
"a defendant [who] has been convicted of both state and federal crimes. . . does not have a constitutional right to serve one sentence before the other. These matters are decided as matters of comity between the state and federal jurisdictions."
The petitioner served his sentence consecutively and cannot be heard to argue that fairness dictates an entitlement of credit against his state sentence for time served under his federal sentence.

II.
The petitioner has advanced the alternative argument that he is entitled to "good-time" credit against his state sentence for the time spent in the federal penitentiary. Generally, good conduct credits are in the nature of a reward which are granted to the convict for his commendable behavior and are designed to induce similar conduct during the remainder of the convict's imprisonment. Ex parte Wier, 102 Colo. 321, 78 P.2d 1094 (1938); Criminal Procedure in ColoradoA Summary and Recommendations for Improvement, 22 Rocky Mt.L.Rev. 221 (1950). The allowance of credit for good conduct is not a right but rather a benefit conferred by the state. For that reason, the conditions under *334 which a sentence will be shortened are controlled entirely by statute.
In this regard, section 27-20-104, C.R.S. 1973 provides that:

"[e]very convict who is imprisoned in the state penitentiary and who performs faithfully the duties assigned to him during his imprisonment therein shall be entitled to a deduction from the time of his sentence for the respective years thereof, and proportionately for any part of a year, when there is a fractional part of a year in the sentence: For the first year, one month; for the second year, two months; for the third year, three months; for the fourth year, four months; for the fifth year, five months; and for the sixth and each succeeding year, six months." (Emphasis added.)
Similarly, section 27-20-107, C.R.S. 1973 states that:

"every prisoner confined in the state penitentiary who has committed no infraction of the rules or regulations of the prison or the laws of the state and who performs in a faithful, diligent, industrious, orderly and peaceable manner the work, duties, and tasks assigned to him to the satisfaction of the warden may be allowed time credit reductions. . . ." (Emphasis added.)
By their express terms, these statutes are limited in application to state convicts incarcerated in the penitentiary of this state. The legislature has not seen fit to extend the privilege of good conduct credit to prisoners for time spent in confinement outside of this state immediately prior to imprisonment in this state. See Mills v. Beto, 477 F.2d 124 (5th Cir. 1973); cf. McGinnis, Commissioner v. Royster, 410 U.S. 263, 93 S.Ct. 1055, 35 L. Ed.2d 282 (1972). It is the convict's behavior in the penitentiary of this state, not that of some other jurisdiction, which is being rewarded.
The judgment is affirmed.
NOTES
[1]  Now section 18-3-401, C.R.S.1973.
[2]  Now section 18-2-201, C.R.S.1973.
