We are here called upon to determine if petitioner, a parolee from the penitentiary, was as a matter of law entitled to credit as time served for the period which elapsed between the violation of the terms of his parole and a subsequent violation which resulted in service.of a warrant for his return as a parole violator.
The record discloses that petitioner was paroled on November 2, 1962. Although it appears that plaintiff did certain things during early 1964 which might have furnished a basis for revocation, on October 26, 1964 he pleaded guilty to the crime of ■petty theft in California and was sentenced to serve twenty days in the county jail. In August 1965 he was found guilty of having possession of a shotgun. The writ asserts, and respondent does not deny that on November 17, 1964, it “executed a statement authorizing the retaking of a paroled prisoner, but held it in abeyance and same was not sent to California authorities until after August 14, 1965”; that petitioner was returned to the penitentiary December 26, 1965, and his parole was revoked January 13, 1966, effective October 23, 1964, being the date of the petty theft for which he was convicted on October 26, 1964.
By application for writ of mandamus, petitioner sought to have respondent ordered to grant him credit for the period of October 23, 1964 to August 14, 1965 — approximately 8J^ months — as time served on his sentence. The trial court issued its alternative writ of mandamus, which it quashed after a hearing, for the stated reason that § 41-17-28(c), N.M.S.A.1953, made discretionary respondent’s acts in revoking paroles. This appeal followed.
The pertinent statute is § 41-17-28, N. M.S.A.1953, which reads:
“A. At any time during release on parole the board or the director may issue a warrant for the arrest of the released prisoner for violation of any of the conditions of release, or issue a no*387tice to appear to answer a charge of violation. The notice shall be served personally upon the prisoner. The warrant shall authorize the superintendent of the institution from which the prisoner was released to return the prisoner to the actual custody of the institution or to any other suitable detention facility designated by the board or the director. If the prisoner is out of the state, the warrant shall authorize the superintendent to return him to the state.
“B. The director may arrest the prisoner without a warrant or may deputize any officer with power of arrest to do so by giving him a written statement setting forth that the prisoner has, in the judgment of the director, violated the conditions of his release. Where an arrest is made without a warrant, the prisoner shall not be returned to the institution unless authorized by the director or the board. Pending hearing as provided by law ttpon any charge of violation, the prisoner shall remain incarcerated in the institution.
•“C. Upon arrest and detention, the board shall cause the prisoner to be promptly brought before it for a parole revocation hearing on -the parole violation charged, under rules and regulations the board may adopt. If violation is established, the board may continue or revoke the parole or enter any other order as’ it sees fit.
“D. A prisoner for whose return a warrant has been issued shall, if it is found that the warrant cannot be served, be a fugitive from justice. If it appears that he has violated the provisions of his release, the board shall determine whether the time from the date of the violation to the date of his arrest, or any part of it, shall be counted as time served under the sentence.”
We would first observe that release on parole has been held by us to be an act of clemency or grace, the granting or denial of which is entirely within the discretion of the State Board of Probation and Parole. Robinson v. Cox, 77 N.M. 55, 419 P. 2d 253 (1966). Compare Folks v. Patterson, 159 Colo. 403, 412 P.2d 214 (1966). Also, § 41-17-24, N.M.S.A.1953, provides that a prisoner on parole is in legal custody of the institution from which he was released, but is subject to the orders of the State Board of Probation and Parole. Section 41-17-30, N.M.S.A.1953, provides that time served while on parole is to be considered the same as time served in the prison and, except as to fugitives as provided in § 41-17-28(D), supra,.the total time served both in prison and on parole may not exceed the maximum sentence. It is thus apparent that petitioner’s release date depends upon whether the Board can be required to consider, as time served on a sentence, the time spent on parole after proven violations of the conditions of parole, but before an order for return to the penitentiary is issued. In other words, even though a parolee may have violated conditions of his parole, petitioner; argues that he must be considered, as .ip good standing as a parolee serving his sentence outside the walls until he commits ■ an act for which he is promptly returned within the walls and an.order revoking .parole is, entered.
He recognizes that after a warrant is -is-' sued, if the parolee cannot be located] he; is; a fugitive from justice, and upon>.later’.apprehension, if the Board shall ’so ’deter-! mine, he may be denied credit as; ’time-served for that period fromdhe date of the violation to the date ¡of arrest. ’Section-41-17-28(D) specifically so provides. In-deed, his argument is generally to the ef-: feet that since the law specifically provides for denial-of consideration of time elapsed' while a parolee is a fugitive, and makes no'provision for situations such- as here presented, the Board had no right or power to do what it did, which was to treat him no differently than if he had been a fugitive.
We are thus called upon to answer the question of whether the authority granted the Board in § 41-17-28, supra, “* * * [to] continue or revoke the parole or enter *388any other order as it sees fit” may be applied so as to permit the Board to determine that the time from the date of a proved violation of law (October 23, 1964) to the date of his next violation (August 14, 1965), being the offense which brought about the issuance of the warrant for his return as a violator, shall not be counted as time served on the sentence.
First, however, we must determine if mandamus is available under the facts. It is a general rule long recognized by us that mandamus will generally not lie to control the discretion or judgment of a public officer. Ross v. State Racing Commission, 64 N.M. 478, 330 P.2d 701 (1958); State ex rel. Four Corners Exploration Co. v. Walker, 60 N.M. 459, 292 P.2d 329. (1956).
While the rule is as set forth, the question here is whether respondent, in the exercise of its discretion, has in any way departed from the statutory limitations placed thereon by the legislature. That mandamus may be employed to require the Board to act legally, or to abide by the law,- without specifying what it should do within the limitations provided in the statute, would seem to accord with the rule. See Ross v. State Racing Commission, supra; McGee v. Arizona State Board of Pardons and Paroles, 92 Ariz. 317, 376 P. 2d 779 (1962); In re Petition of Carey, 372 Mich. 378, 126 N.W.2d 727 (1964); State ex rel. Buse v. Drewniak, 252 Wis. 431, 31 N.W.2d 773 (1948). While revocation of parole rests entirely in the discretion of the Board and cannot be reviewed by us, Robinson v. Cox, supra, we perceive that mandamus is available to petitioner to assure that the Board in its orders revoking parole complies with the provisions of § 41-17-28(C), supra. See Rask v. Board of Bar Examiners, 75 N.M. 617, 409 P.2d 256 (1966); Kiddy v. Board of County Com’rs of Eddy County, 57 N.M. 145, 255 P.2d 678 (1953).
Accordingly, we are brought to a consideration of whether the authority in § 41-17-28(C), s'upra, to the Board to “enter. any * * * order as it sees fit,” permits an order such as the one herein attacked. It is specifically provided for in cases where the parolee is a fugitive (§ 41 — 17— 28(D), supra) but petitioner here was not a fugitive. The fact that the provision is emitted in § 41-17-28(C), supra, while being included in § 41-17-28(D), supra, certainly is some evidence that denial of credit for time spent out of custody after breach of parole conditions was not contemplated or to be permitted.
While we recognize that the authority granted respondent to enter any order “as it sees fit” might seem to be sufficiently broad to permit the denial of credit as here undertaken, we cannot believe it was intended by.the use of such language to grant unrestricted power. In the first place, considerable question would arise that it could be done constitutionally. See Rask v. Board of Bar Examiners, supra; State ex rel. Holmes v. State Board of Finance, 69 N.M. 430, 367 P.2d 925 (1961); Yick Wo v. Hopkins, 118 U.S. 356, 65 S. Ct. 1064, 30 L.Ed. 220 (1886). Secondly, as already noted, the failure of the legislature to provide for denial of credit during period of unreasonable delay between knowledge of the violation and revocation, as specifically directed in cases of fugitives, indicates an intention not to deny credit for the period. Thirdly, and most important, it seems to us that § 41-17-28, supra, was intended to permit the Board to determine whether to issue a warrant for the parole violator’s return and to consider the matter of his parole revocation. The Board is not obligated to issue such a warrant, and if it does not do so the parolee continues on parole. § 41-17-30, N.M.S. A.1953. However, if the Board determines that the parolee should be returned, it must promptly issue the warrant against a violator whose whereabouts are known and whose return is possible. The statute does not contemplate delay or holding in abeyance a warrant following one breach to await additional defaults, as apparently was done here.
*389To permit a different procedure would make it possible for the respondent to hold an order itntil the full sentence had been served after release on parole, whereupon the prisoner could be returned to prison and forced to serve the time which elapsed after the breach. This would be grossly unfair, contrary to § 41-17-30, supra, and, in our view, could not have been intended by the legislature. Compare In re Hall, 63 Cal.2d 115, 45 Cal.Rptr. 133, 403 P.2d 389 (1965); Aguilera v. California Dept. of Corrections, 247 Cal.App.2d 150, 55 Cal.Rptr. 292 (1967) ; People ex rel. Rainone v. Murphy, 1 N.Y.2d 367, 153 N.Y.S.2d 21, 135 N.E.2d 567 (1956). Likewise, we are impressed that a denial of due process could result when a citizen is denied his liberty at the whim, sufferance of caprice of respondent, as necessarily would follow from approval of the argument concerning its right to make orders affecting petitioner’s custody, “as it sees fit.” Yick Wo v. Hopkins, supra; United States ex rel. Howard v. Ragen, 59 F.Supp. 374 (N.D.Ill.1945); Ex parte Bice, 42 Ala.App. 547, 171 So.2d 261 (1964); Colin v. Bannon, 337 Mich. 491, 60 N.W.2d 431 (1953).
It follows from what we have said that the court erred in quashing its alternative writ of mandamus, and that the cause should be reversed and remanded with instructions to the district court to order the respondent to grant petitioner credit for the time elapsed between October 23, 1964 and August 14, 1965. In so directing, we are in no way interfering with the discretion of respondent. See Rask v. Board of Bar Examiners, supra; Sender v. Montoya, 73 N.M. 287, 387 P.2d 860 (1963); Ross v. State Racing Commission, supra; Kiddy v. Board of County Com’rs of Eddy County, supra.
It is so ordered.
COMPTON and CARMODY, JJ., concur.