In the usual Habeas Corpus Post Conviction petition, allegations are made that a conviction should be set aside for reasons there given.
Not so in this case.
We are here presented with an issue, which though not unprecedented1 is to say the least unusual in that we are asked only to determine when a validly imposed sentence resulting from a conviction should commence. We conclude that the Petitioner is entitled to a credit of one year and 17 days on the sentence he is now serving.
Arrival at this conclusion has not been easy because of the complexity of the facts which are before us in an agreed statement.
*196The problem comes to us on Report pursuant to Rule 72(b) M.R.Civ.P. The Petitioner sought post conviction relief under 14 M.R.S.A. §§ 5501 et seq and Rule 35(b) M.R.Crim.P.
We describe the facts as “complex” because: On June 15, 1967, Petitioner was convicted on a plea of guilty to a charge of “Assault with intent to Rape.” A sentence of not less than 4Vi years and not more than 10 years in the Maine State Prison was imposed (Lincoln County Criminal Docket Number 1558). On September 28,1970, Petitioner was placed on parole from this sentence. While he was on such parole Petitioner was indicted for felonious homicide punishable as “murder” and “Assault with intent to Kill.” A jury trial resulted in verdicts of guilty of “manslaughter” and guilty of “assault” (simple).
On February 14, 1973, judgment was entered on the verdict and Petitioner was sentenced to a term of not less than 10 years and not more than 20 years in the Maine State Prison for “manslaughter” (Cumberland County Criminal Docket Number 72-1006), and to a term of 6 months in the Cumberland County Jail for the offense of “assault” (Cumberland County Criminal Docket Number 73-6). The latter sentence was made to run concurrently with the sentence imposed on Cumberland County Criminal Docket Number 72-1006. On February 14, Petitioner was committed to the Maine State Prison in execution of the sentence imposed in Cumberland County Criminal Docket Number 72-1006.2
It appears, however, that an Arrest and Detention Warrant for parole violations had been outstanding against Petitioner since October 16, 1972. On the day of Petitioner’s commitment to the Prison, therefore, he was removed from execution of Docket No. 72-1006 and detained pending determination of his parole status.3 On February 22, 1973, after a preliminary hearing, no probable cause of parole violation was found.4 Petitioner was accordingly placed on active parole status with regard to Docket No. 1558 and placed in execution of Docket No. 72-1006.
On December 26, 1973, however, prison officials notified Petitioner that, “pursuant to a ruling by the Attorney General of the State of Maine” he was not in execution of sentence imposed under Docket No. 72-1006, but that his status was of being on parole from Docket No. 1558. The sentence imposed under Docket No. 72-1006 was to run consecutively to the sentence from which he was on parole. The Attorney General had based his “ruling” on his reading of 34 M.R.S.A. § 1676.5
Finally, on December 28, 1973, the Petitioner was paroled from Docket No. 1558 and discharged to Docket No. 72-1006, with execution of that sentence to begin on the same day. Thereafter, on April 28, 1975, Petitioner filed his Petition for Writ of Habeas Corpus, alleging that his commitment violated his rights under the Fifth and Fourteenth Amendments to the United States Constitution and Article I, Sections 6, 6-A and 8 of the Maine Constitution.
The issues agreed upon for determination are as follows:
1. Whether the issues presented by this Petition are moot.
2. Whether the Petitioner is entitled to relief, and if so, what form of relief.
*1973. Whether 14 M.R.S.A. §§ 5501 et seq. is a proper remedy for the Petitioner if he in fact has been aggrieved.
4. Whether the operation of 14 M.R.S.A. § 1676 to the agreed statement of facts mandated an illegal imprisonment of the Petitioner.
We find that we have jurisdiction over the Petition; that the issues presented are not moot; and that Petitioner is entitled to relief.
When, as in the case before us, one alleges he was improperly deprived of credit for time served on a prison sentence, we have decided in previous cases post conviction relief may be sought either
a. under Rule 35(b) M.R.Crim.P. and 14 M.R.S.A. §§ 5501, et seq. See Green v. State, Me., 245 A.2d 147 (1968), or
b. by use of a petition for declaratory judgment pursuant to 14 M.R.S.A. §§ 5951, et seq. See Higgins v. Robbins, Me., 265 A.2d 90 (1970); Reed v. State, Me., 295 A.2d 657 (1972).
In Green v. State, supra, the Petitioner was given credit for time spent in the Maine State Prison under a sentence which was eventually set aside for error. This credit was applied to a sentence which the Petitioner was validly serving for an offense committed while on parole from the first sentence. In holding that the Petitioner was entitled to relief under 14 M.R. 5.A. §§ 5502-08 we stated that:
“Our post-conviction habeas corpus however was not intended to be a mere consolidated substitute for former remedies with their limited and fixed common law connotations, but designed as it was to be the sole and exclusive method of collateral attack upon the legality of a conviction and sentence [citation omitted], it must be given such reasonable flexibility within the spirit of the statutory enactment that it may be an effective procedural vehicle for collaterally reaching all fundamental defects in the administration of criminal justice.” Id at 150.
In Higgins v. Robbins, supra, we held that habeas corpus relief was not the only means of seeking post-conviction redress, but that a declaratory judgment might also be appropriate.6 In Reed v. State, supra, we held further that declaratory judgment relief was more appropriate than habeas corpus where a Petitioner sought credit for time spent in the Penobscot County Jail where he was awaiting sentencing to be applied to his eventual sentence to the Maine State Prison.
Upon reviewing these cases, it appears that Petitioner here was correct in seeking habeas corpus relief. As will be discussed later, Petitioner is entitled to credit for time illegally spent in the State Prison. That credit will be applied to the subsequent valid sentence to the State Prison, from the first day of the actual incarceration of the prisoner after the imposition of the subsequent valid sentence. In this respect, at least, the case is on all fours with Green v. State, supra. Here, as in Green, habeas corpus relief is the proper remedy.
This petition is not moot.
While Petitioner has been discharged from Docket No. 1558, he remains incarcerated upon another, concededly valid, sentence. The relief to which Petitioner is entitled is credit for the time spent while he was in the anomalous position of being imprisoned while he was on parole. Since Petitioner is currently incarcerated and since this credit will affect the length of time he must spend imprisoned on Docket No. 72-1006, the issue is clearly not moot.
Finally, we determine that Petitioner is entitled to relief.
In arguing that Petitioner was not illegally incarcerated, the State asks that the *198following construction be placed on the sequence of events following Petitioner’s conviction under Docket No. 72-1006. Because of the effect of 34 M.R.S.A. § 1676, the State argues, Petitioner did not begin to serve his manslaughter sentence upon his recommitment to the Prison. This is so regardless of what the prison officials may have thought at the time, or of what they might have told Petitioner.7 Instead, when Petitioner was returned to the Prison, his “Assault with intent to Rape” sentence, which had been interrupted by the issuance of the parole violation warrant of October 16, 1972, began to run again.8 Following the preliminary hearing on February 22, 1973, however, in which no probable cause of parole violations was found, Petitioner was returned to active parole status with regard to the “Assault with intent to Rape”. Petitioner was not in execution of his manslaughter sentence even at that point, again because of 34 M.R.S.A. § 1676.
Despite the fact that Petitioner was on active parole, which had never been formally terminated, for one sentence and could not be in execution of his second sentence, Petitioner remained incarcerated from February 22, 1973 until December 28, 1973, when his second sentence was begun. The State insists that the incarceration was not illegal, however, because Petitioner had applied for bail pending appeal of his manslaughter conviction and that application had been denied on March 6, 1973. Petitioner was discharged to his second sentence before his appeal was finally denied. Therefore, Petitioner’s incarceration from February until December was due to his no-bail status and was entirely legal.
The State admits that ordinarily Rule 46(a) of the Maine Rules of Criminal Procedure requires that time spent in prison pending appeal be credited toward the sentence. Because of the effect of 34 M.R.S.A. § 1676 in this case, however, the State argues that Petitioner is not entitled to any credit.
We cannot construe Petitioner’s incarceration from February 22, 1973 until December 28, 1973 as being due to Petitioner’s no-bail status, however. The interplay of Rules 46(a) and 38(a)(1), M.R.Crim.P., dictates that if Petitioner were imprisoned because he had been denied bail, and the sentence had not been stayed by the Trial Court, then he should receive credit for the time spent in prison until his appeal was decided. See generally H. Glassman, Maine Practice, § 38.1 (Supp.1975). It follows, therefore, that if Petitioner was incarcerated because of his no-bail status, then he was actually serving his second sentence. This was impossible, however, because of the effect of 34 M.R.S.A. § 1676.
We are thus left with no other possibility than to conclude that Petitioner was serving time, from February until December of 1973, on his first sentence. Petitioner’s parole, therefore, had been revoked de facto without any process at all, let alone without due process requirements mandated by Morrissey v. Brewer, 408 U.S. 471, 92 S.Ct. 2593, 33 L.Ed.2d 484 (1972) and State v. Caron, Me., 334 A.2d 495 (1975) or even required by our own statute, 34 M.R.S.A. § 1675 (repealed effective May 1, 1976). See Gordon v. Mullaney, Me., 317 A.2d 804 (1974). Petitioner’s imprisonment from February 22, the date he was reinstated to active parole status, to December 28, the date he was discharged to the manslaughter sentence, was illegal. Therefore, the application of 34 M.R.S.A. § 1676 to the present case, requiring that the only sentence which *199Petitioner could serve from February until December was the sentence from which Petitioner had been paroled but where the parole had never been revoked, created an illegal result.
In Green v. State, supra, we found that the remedy for an illegal incarceration under a prior sentence was to credit the time spent in prison under the illegal sentence towards the subsequent valid sentence.
That remedy must be applied in the instant case.
The time that Petitioner served was ten months and six days plus seventy-one days of good time. The total credit to which Petitioner is entitled on his sentence under Docket No. 72-1006 is therefore one year and seventeen days.
The entry must be
The case is remanded to the single Justice to whom the petition for post-conviction relief was assigned for an appropriate order under 14 M.R.S.A. § 5505 consistent with this opinion.
DUFRESNE, Acting Retired Judge, sat at oral argument as Chief Justice, but retired prior to the preparation of the opinion. He has joined the opinion as Active Retired Justice.
DELAHANTY, J., sat at oral argument and at conference, but participated no further.
WERNICK, ARCHIBALD and GOD-FREY, JJ., and DUFRESNE, Acting Retired Judge, concurring.
. See Reed v. State, Me., 295 A.2d 657 (1972).
. An appeal from the conviction was entered, prosecuted and denied. State v. Boutot, Me., 325 A.2d 34 (1974). While not noted in the Agreed Statement of Facts the record discloses that Petitioner sought to obtain bail pending appeal. Bail was denied by the trial justice by order dated March 6, 1973.
. The alleged parole violations were use of intoxicants and possession of a loaded handgun.
. This seemingly anomalous finding was based on the inordinate amount of time that had lapsed between the issuance of the Warrant and Petitioner’s return to the Prison.
.34 M.R.S.A. § 1676 reads as follows:
“Any parolee who commits an offense while on parole who is sentenced to the State Prison shall serve the 2nd sentence beginning on the date of termination of the first sentence, unless the first sentence is otherwise terminated by the board.”
The statute was repealed effective May 1, 1976.
. 14 M.R.S.A. § 5502 states that habeas corpus “comprehends and takes the place of all other common law remedies which have heretofore been available for challenging the validity of a conviction and sentence and shall be used exclusively in lieu thereof.” In Higgins, we held that since a declaratory judgment was not a common law remedy, its use was not excluded by the habeas corpus statute. Id. at 92.
. The State supports this statement by arguing that the prison officials here are in the same posture as a trial judge who gives a sentence that violates the requirement of 34 M.R.S.A. § 1676, since neither can exercise discretion over when the second sentence is to start. See Higgins v. Robbins, Me., 270 A.2d 81 (1970); Kuhn v. State Me., 254 A.2d 591 (1969); Hartley v. State, Me., 249 A.2d 38 (1969); Cressey v. State, 161 Me. 295, 211 A.2d 572 (1965).
. 34 M.R.S.A. § 1675 (1973 Supp.) reads in pertinent part as follows:
“Whenever a warrant is issued under this section for the arrest of a parolee, the running of the parolee’s sentence shall be interrupted and shall remain interrupted until the parolee is returned to the institution from which he was paroled.”