FAHY, Circuit Judge.
While serving with the United States Army in Germany, appellant, on a plea of guilty to a charge of murder, as defined by Article 118 of the Uniform Code of Military Justice, was sentenced by court-martial to life imprisonment. The Secretary of the Army reduced the sentence to a term of eight years, to expire April 30, 1964.
Appellant was committed initially to the United States Disciplinary Barracks, Fort Leavenworth, Kansas, a military prison. Thereafter, pursuant to Article 58 of the Uniform Code of Miltary Justice, set forth in the margin, he was transferred to the United States Reformatory, Chillicothe, Ohio, and later to the United States Penitentiary, Lewis-burg, Pennsylvania, where he was confined when he initiated this litigation. The Lewisburg Penitentiary is under civilian control.
A prisoner confined in such a civilian institution when discharged with good-time credit is conditionally released and considered as on parole, under the supervision of the United States Board of Parole for the unexpired period of his sentence. See, e. g., Miller v. Taylor, 290 F.2d 8 (10th Cir. 1961); Howard v. United States, 274 F.2d 100 (8th Cir. 1960), cert. denied, 363 U.S. 832, 80 S.Ct. 1604, 4 L.Ed.2d 1525; Hicks v. Reid, 90 U.S.App.D.C. 109, 194 F.2d 327, cert. denied, 344 U.S. 840, 73 S.Ct. 51, 97 L.Ed. 653. With credit for good time appellant was to be released January 15, 1962, subject, however, to the parole conditions referred to unless, as he contends, those conditions did not apply to him.
On June 5, 1961, appellant filed suit in the District Court against the United States Board of Parole seeking a declaratory judgment that parole conditions could not validly be applied to him because he had been convicted by court-martial. On motion of the Board of Parole the court dismissed the complaint as moot, the ground advanced in the motion. This appeal is from the order of dismissal.
We must first determine whether a case or controversy had arisen within the meaning of Article III of the Constitution granting jurisdiction to the courts of the United States. We think it had. Under Army Regulations there is a system of good-time credits comparable to that applicable to persons convicted in the civil courts and committed to civilian institutions; but a person convicted by court-martial whose confinement is carried out in an Army prison is not placed on parole when released before expiration of his full sentence because of good-time credit. He is released unconditionally. Appellant contends that this is the sort of release to which he was entitled, yet he was being held under the more restrictive conditions applicable to persons sentenced by the civil courts. This he says deprived him of the equal protection of the laws in violation of the due process clause of the Fifth Amendment.
The case or controversy issue is not controlled by decisions in habeas corpus proceedings where relief has been denied because sought prior to the time for actual release. The writ of habeas corpus has its own special function; it is ordinarily available only to vindicate the right to be free of restraint at the time the writ is sought, not at some future time. Relief by a declaratory judgment is not so limited. It may be had though habeas corpus is not the appropriate remedy. McGrath v. Kristensen, 340 U.S. 162, 168-69, 71 S.Ct. 224, 95 L.Ed. 173. Appellant was not obliged to wait until released and actually subjected to the allegedly illegal restraint before obtaining a decision as to the validity of such restraint. Under the terms of his sentence and confinement the restraint he claimed would be illegal was practically inevitable unless prior to being subjected to it he could obtain a decision that it could not validly attach to him. There was no disclaimer by appellee of the application of parole conditions to appellant. On the contrary, with the support of the Department of Justice appellee’s position has consistently been that those conditions were applicable to appellant. He sought a decision as to his status different than that of prisoners at Lewisburg who had not been convicted by court-martial. Cf. McGrath v. Kristensen, supra. The issue as to this was a justiciable one. When he filed suit there existed a definite legal impact upon appellant due to the administration of his sentence as one to which parole conditions applied. The impact upon him naturally would increase when he would be actually subjected to restraints upon his release, but he need not await a greater impact if there existed a sufficient one. When he sued there existed a clear legal controversy affecting his status and the conditions of his confinement and release. Cf. Remington Prod. Corp. v. American Aerovap, Inc., 97 F.Supp. 644, 646-47 (S.D.N.Y. 1951), aff’d, 192 F.2d 872 (2d Cir. 1951). It was in the interest of all parties to have it resolved.
In Evers v. Dwyer, 358 U.S. 202, 79 S.Ct. 178, 3 L.Ed.2d 222, the Supreme Court, quoting its earlier opinion in Maryland Casualty Co. v. Pacific Coal & Oil Co., 312 U.S. 270, 273, 61 S.Ct. 510, 85 L.Ed. 826, referred to the case or controversy problem as follows:
“The difference between an abstract question and a ‘controversy’ contemplated by the Declaratory Judgment Act is necessarily one of degree, and it would be difficult, if it would be possible, to fashion a precise test for determining in every case whether there is such a controversy. Basically, the question in each case is whether the facts alleged, under all the circumstances, show that there is a substantial controversy, between parties having adverse legal interests, of sufficient immediacy and reality to warrant the issuance of a declaratory judgment.”
358 U.S. at 203, 79 S.Ct. at 179.
While our appraisal of the situation in light of the foregoing principles is not free from doubt we think appellant’s complaint should not have been dismissed as moot, or as not presenting a case or controversy. Where the situation, as here, affects personal liberty, the courts should not be anxious to avoid decision.
On the merits, however, appellant is not entitled to the relief he seeks and his complaint should stand dismissed. As we have said, his position is that he is denied the equal protection of the laws in violation of the due process clause of the Fifth Amendment. More precisely, as we have also said, he contends that a military prisoner is not subject to parole conditions when he has served his term of imprisonment under the supervision of military authorities, and that to treat him differently because of his transfer to a penitentiary of the United States under civilian control, and thus to subject him to parole conditions, is unconstitutional. But appellant is not being treated any differently than all persons confined as he was under the terms of 10 U.S.C. § 858(a), note 2, supra. Congress has authorized such confinement of appellant. He is not within a class of persons convicted by court-martial who remain confined under military authority. In determining whether he is being denied equal protection of the laws the class to which he belongs consists of the persons confined as he was confined, subject to the same conditions to which he was subject. There is no unconstitutional discrimination or other denial of due process because of the recognition by Congress that it is desirable and feasible for persons confined in such institutions as-Lewisburg to be subject to certain specified and salutary parole conditions, notwithstanding like provisions have not been deemed desirable or feasible for those who serve their sentences in a military prison, though they also have their imprisonment shortened by good-time-credit.
In Bates v. Wilkinson, 267 F.2d 779 (5th Cir. 1959), though it arose in different factual circumstances the legal question decided is the same as the one before us. We agree with the reasoning and conclusion of the court set forth in the opinion of Judge Rives in that case. And see Stewart v. United States Board of Parole, 285 F.2d 421 (10th Cir. 1960), cert. denied, 365 U.S. 862, 81 S.Ct. 830, 5 L.Ed.2d 825; Easley v. United States, 257 F.2d 174 (10th Cir. 1958); Jones v. Looney, 107 F.Supp. 624, 627 (E.D.Mich. 1952); Johnson v. Hiatt, 71 F.Supp. 865 (M.D.Pa. 1947), aff’d, 163 F.2d 1018 (3d Cir. 1947), cert. denied, 333 U.S. 829, 68 S.Ct. 446, 92 L.Ed.
Affirmed.
. 10 U.S.C. § 918 (1958).
. This article provides that,
“a sentence of confinement adjudged by a court-martial * * * may be car-
ried into execution by confinement in any * * * penal or correctional institution under the control of the United States, or which the United States may be allowed to use. Persons so confined in a penal or correctional institution not under the control of one of the armed forces are subject to the same discipline and treatment as persons confined or committed by the courts of the United States * *
10 U.S.C. § 858(a) (1958). See, also, 18 U.S.C. § 4083 (Supp. III, 1959-61).
. See 18 U.S.C. § 4161 (Supp. III, 1959-61).
. There is also a minimum statutory reduction of sentence of 180 days for good conduct. 18 U.S.C. §§ 4163, 4164 (1958).
. By statute the Board of Parole is conferred broad discretionary powers in formulating the terms and conditions of release on parole including the submittal of personal reports. See 18 U.S.C. § 4203 (1958). This power is also applicable to those who have been released upon the expiration of their maximum sentence less the statutory deductions for good conduct. See Gould v. Green, 78 U.S.App.D.C. 363, 141 F.2d 533.
. 28 U.S.C. § 2201 (1958).
. AR 633-30 (1955).
. It is true that appellant could have forfeited his earned good time by committing an offense or violating the rules of the institution. See 18 U.S.O. § 4165 (1958). The briefs of the parties, however, indicate that not only did appellant receive the ordinary good-time allowances but in addition received extra good-time credits between August 1, 1958, and August 31, 1960, which is indicative of appellant’s good behavior and the remoteness of the possibility that he would have forfeited such credits prior to his tentative release date. We are further advised that appellant was released from confinement on January 15, 1962, under the supervision of the United States Board of Parole.
. Appellee, represented by the Department of Justice, has raised no question as to the necessity for additional parties defendant.