
117 Ariz. 476 (1978)
573 P.2d 876
Milton E. BROWN, Jr., Petitioner,
v.
STATE of Arizona, Respondent.
No. H-742.
Supreme Court of Arizona, In Banc.
January 9, 1978.
*477 Milton E. Brown, Jr., in pro per.
Bruce E. Babbitt, Atty. Gen., by Robert F. Ellig, Asst. Atty. Gen., Phoenix, for respondent.
HOLOHAN, Justice.
The petitioner, Milton E. Brown, Jr., by petition for writ of habeas corpus seeks to require the Department of Corrections to credit him with two-for-one time while he is in protective custody at the state prison. We accepted jurisdiction for the limited purpose of reviewing certain of the legal issues raised by petitioner.
At the outset it must be noted that the petitioner is not entitled to habeas corpus relief because he does not allege any facts which show that he is entitled to immediate release from custody. Goodman v. State, 96 Ariz. 139, 393 P.2d 148 (1964); Whitt v. State Department of Corrections, 108 Ariz. 301, 497 P.2d 514 (1972). Despite the fact that the petitioner is not entitled to relief by habeas corpus we have held in the past that where relief may be granted by extraordinary writ (special action), this court may grant the appropriate relief even though the writ applied for or the motion made is not aptly titled. We look to substance, *478 not to form. Goodman v. State, supra. We therefore will treat the petition as one for relief by way of special action.
Certain matters alleged in the petition are not disputed, namely: that petitioner is a prisoner serving a lawful sentence at the Arizona State Prison at Florence, Arizona; that petitioner requested that he be placed in protective custody because he feared for his personal safety; that his request for placement in protective custody was honored by prison authorities; that petitioner was advised that he would not be eligible for two-for-one time while in protective custody.
The petitioner also alleges that every inmate in the general population of the prison is credited with double time deduction whether they are working or not, provided they are not under penalty of specifically prescribed "punitive punishment actions." The state denies this allegation.
In Hogan v. Arizona Board of Pardons and Paroles, 108 Ariz. 472, 501 P.2d 944 (1972) we held that it was entirely discretionary within the administration of the state prison who shall be assigned to work which would qualify for the two-for-one credit under A.R.S. § 31-252. That holding, however, proceeded on the assumption that time credits were being awarded to prisoners by the Department of Corrections and the state prison based on the requirements of A.R.S. § 31-252. Petitioner alleges that the Department and the prison administration have by practice been allowing all prisoners the time credit. If true, this practice casts a different light on the issue and distinguishes this case from that in Hogan.
Since Wolff v. McDonnell, 418 U.S. 539, 94 S.Ct. 2963, 41 L.Ed.2d 935 (1974) it is clear that a prisoner serving a sentence of lawful imprisonment is not stripped of all constitutional protections. Such prisoners have the protection of the Constitution in a number of instances including the Equal Protection and Due Process Clauses of the Fourteenth Amendment. However, not every deprivation imposed by prison authorities on a prisoner triggers the procedural protection of the Due Process Clause. Meachum v. Fano, 427 U.S. 215, 96 S.Ct. 2532, 49 L.Ed.2d 451 (1976); Montayne v. Haymes, 427 U.S. 236, 96 S.Ct. 2543, 49 L.Ed.2d 466 (1976). The interest to be protected must be a liberty interest, whether created by statute or constitution. If a liberty interest is involved it may not be forfeited by state arbitrary action. Wolff v. McDonnell, supra; Meachum v. Fano, supra.
The petitioner has attempted to set forth two liberty interests: his right to life and his right to equal protection under law. As a sentenced prisoner he has forfeited his freedom to go and come as he pleases, but he has not forfeited his right to life. The state may confine petitioner for his crime, but the state has the obligation of protecting him from harm while he is confined in its custody. Finney v. Arkansas Board of Corrections, 505 F.2d 194 (8th Cir., 1974). The state must also apply statutory privileges in the same manner to all who qualify for such privileges.
It is suggested that petitioner is in his present situation because he has requested that type of confinement with the knowledge that the prison administration would hold him ineligible for the two-for-one credits under A.R.S. § 31-252. Petitioner readily admits that he was required to sign a waiver for his two-for-one credits when he was placed in protective custody. Normally such conduct would constitute a waiver of any right to complain. Petitioner, however, contends that he sought protective custody because he was in fear for his life. Under such circumstances there can be no waiver. Cf. Johnson v. Zerbst, 304 U.S. 458, 58 S.Ct. 1019, 82 L.Ed. 1461 (1938); Sweet v. South Carolina Dept. of Corrections, 529 F.2d 854, 868 (4th Cir., 1975).
The last point concerns the allowance of time credits by the Department of *479 Corrections under A.R.S. § 31-252.[*] The Department argues that it has not made the required filing (A.R.S. § 41-1004) of regulations with the Secretary of State, so there can be no effective regulations allowing good time credits under which petitioner could qualify. See Thomas v. Ariz. State Bd. of Pardons and Paroles, 115 Ariz. 128, 564 P.2d 79 (1977). The Department cannot grant privileges to one group of prisoners and arbitrarily deny the same privileges to another prisoner because it chooses to find its regulations valid in one instance and invalid in another. Obviously the Department must comply with the law and file its regulations with the Secretary of State, but in the meanwhile the current lack of regulations cannot be used to confer benefits on some prisoners and not on others in substantially the same condition.
We have outlined the legal principles applicable to the issues in this case, but the present state of the record prevents us from making a final disposition of the case because there appear to be matters of fact in dispute. We believe, however, that those matters can be resolved administratively by the Department of Corrections following the views expressed in this opinion. It is, therefore, ordered that the state, acting through the Department of Corrections, reconsider the application of petitioner for the time credits authorized by A.R.S. § 31-252. If the petitioner is denied time credits he should file any subsequent claim for relief in the Superior Court where there can be a hearing and resolution of disputed facts.
CAMERON, C.J., STRUCKMEYER, V.C.J., and HAYS and GORDON, JJ., approved.
NOTES
[*]  The statute provides three methods of earning double time deduction (two-for-one time): first, working on public highways or the prison farm as a trusty outside the walls; second, performing any assignment of confidence within or without the prison wall; or third, pursuant to rules and regulations established by the Department of Corrections.
