
82 Cal.Rptr.2d 580 (1999)
70 Cal.App.4th 333
In re Anthony MIKHAIL on Habeas Corpus.
No. B123311.
Court of Appeal, Second District, Division Four.
February 25, 1999.
As Modified March 12, 1999.
Jonathan B. Steiner, Los Angeles, under appointment by the Court of Appeal, for Petitioner.
Daniel E. Lungren and Bill Lockyer, Attorneys General, George Williamson, Chief Assistant Attorney General, Carol Wendelin Pollack, Senior Assistant Attorney General, John R. Gorey, Supervising Deputy Attorney *581 General and Lawrence M. Daniels, Deputy Attorney General, for Respondent.
EPSTEIN, J.
Anthony Mikhail, a prisoner at the California State Prison in Los Angeles County, a facility of the Department of Corrections, has petitioned for a writ of habeas corpus. He seeks relief from what he claims is an illegal refusal to restore forfeited worktime credits. He contends that in denying his application for restoration of credits, the Director made an ex post facto application of new statutory authority, and that the statute and regulations in force when his credits were forfeited entitle him to the restoration he seeks. We conclude that his application for relief must be granted.

FACTUAL AND PROCEDURAL SUMMARY
After a series of intermediate proceedings we have extracted the facts pertinent to the case, which we summarize here.
Petitioner was convicted of attempted murder with enhancements, resulting in a 12-year commitment to state prison. While there, on December 23, 1993, he possessed a prison-manufactured weapon. That is classified as a serious prison offense (in prison parlance, an "A-1 offense," after Pen.Code, § 2932, subd. (a)(1); see Cal.Code Regs,, tit. 15, § 3323, subd. (b)(8); all further citations to sections in the 3300 series are to regulations in Title 15). Under rules in force, then and now, that offense resulted in a forfeiture of 360 days worktime credit. Petitioner was adjudicated to have committed the offense, and that amount of credit was forfeited.
The statute and regulations in force at the time conditioned restoration of credit for such an offense on the prisoner being free of further discipline for a year. After petitioner had been free of discipline for that period of time, he applied for restoration. Prison authorities restored 45 days, but refused to restore more. Petitioner exhausted his administrative remedies in seeking to overturn that decision, but was unsuccessful. He then filed a second application, this time arguing an ex post facto violation, and was again unsuccessful. As we shall explain, the statute and regulations had changed in the interim, and prison authorities cited the new law in denying further relief. Petitioner then petitioned the Los Angeles Superior Court for habeas corpus relief, claiming that application of the amended statute and regulations to his case amounted to an ex post facto violation. The superior court denied relief. Petitioner renewed his petition in this court. We sought information and two preliminary responses from the Attorney General, as attorney for the Director and Department of Corrections, and these were received. We then issued an order to show cause why the relief sought by petitioner should not be granted. We also appointed the California Appellate Project as counsel for petitioner. A return to our order was duly filed, as was a denial and traverse by petitioner.
We now have reviewed these applications and replications, and the administrative record lodged with the court.

DISCUSSION
As amended effective 1996, Penal Code section 2933, subdivision (e) provides that, for serious prison offenses punishable by forfeiture of more than 90 days credit, restoration of worktime credit "shall be at the discretion of the director." The Director exercised his authority under this statute by emergency regulations (effective March 20, 1996) that prohibit restoration of credit for offenses in any of several categories, including "A-1" offenses.
In 1993, when petitioner's prison offense was committed, the statute provided that Department regulations shall specify "the percentage of forfeited credits that may be restored" for commission of a felony specified in Penal Code section 2932, subdivision (a)(1). For credits forfeited for such offenses, "the Department of Corrections may provide that up to 180 days of lost credit shall not be restored." Further, "[u]pon application of the prisoner and following completion of the required time period free of disciplinary offenses, forfeited credits eligible for restoration under the regulations shall be restored unless, at a hearing, it is found that the prisoner refused to accept or failed to perform *582 in a credit qualifying assignment or extraordinary circumstances are present that require that credits not be restored." (Pen. Code, § 2933, subd. (c), emphasis added; Pen.Code, former § 2932, subd. (a)(1) requires forfeiture of 360 days of credit for designated prison offenses, including possession or manufacture of a deadly weapon, petitioner's offense in this case.)
The implementing regulation at the time, former section 3328, subdivision (a), provided that "[a]n inmate may apply for restoration of twenty-five percent of any credit forfeited for a Division `A' offense if: [¶] (1) The inmate has remained discipline free for one year" (with an exception not pertinent to this case).
In In re Lomax (1998) 66 Cal.App.4th 639, 643, 78 Cal.Rptr.2d 220, the court considered whether the new statute, making restoration of forfeited worktime credit subject to discretion of the Director, and the implementing regulation exercising that discretion to deny restoration to prisoners who committed a serious offense such as the one in this case, violated the ex post facto provisions of the California Constitution (art. I, § 9) and the federal Constitution (art. I, § 10, cl. 1). The court held that a violation occurred when these provisions were applied to a prisoner whose prison offense occurred before the 1996 amendment to the statute. An earlier case, In re Winner (1997) 56 Cal.App.4th 1481, 66 Cal.Rptr.2d 333, reached the same result by implication, denying a prisoner's habeas corpus application because the prison offense was committed after the statute was amended, although before the implementing regulations were promulgated. The authorities cited and reasoning presented in Lomax are decisive on the issue.
That does not resolve the case before us. Respondent argues that we need not reach the constitutional question because petitioner was not eligible to receive more than 45 days of restored credit under the statute and regulations in force when his offense was committed. We agree that, if this were so, the constitutional provisions would not come into play. But it is not.
The former statute allowed restoration of forfeited credits "eligible under the regulations" of the Director. A prisoner who applied for restoration of forfeited credits was entitled to receive restorable credits, if discipline-free for a year, unless it was found that he or she failed to perform a credit qualifying assignment or that extraordinary circumstances were present requiring that the credit not be restored.
The operative regulation of the Director at the time allowed restoration of 25 percent of forfeited credits. In petitioner's case, that allowed restoration of 90 days' credit. Another regulation, former section 3327, subdivision (a)(2), provided that for "A-1" offenses, 180 days could not be restored. Subdivision (c) of that section set out the substance of the statutory exceptions for cases where the petitioner failed to perform a credit-qualifying assignment or where there were extraordinary circumstances requiring denial of credit restoration. Neither of these exceptions was found in this case.
The Director and Department take the position that, under the former provisions, petitioner was entitled to restoration of 25 percent of 180 days, which is 45 days, the amount of restored credit he received. Petitioner argued that he was entitled to restoration of 25 percent of 360 days, which is 90 days. The dispute is over the 45-day difference.
Reading the provisions together, the statute in force when petitioner's offense was committed provided that in the case of a serious offense such as the one he committed, of the 360 days of worktime credit forfeited, 180 days were not restorable, but the rest was restorable if eligible for restoration under the Director's regulations, unless one of the exceptions was found. The implementing regulation, by which the Director exercised his authority, provided that "twenty-five percent of any credit forfeited" for such an offense was restorable. (Former § 3328.) Notably, the regulation referred to the amount of credit that was forfeited, not the amount that was subject to restoration. Thus, under the rule, the 25 percent divisor applied to 360 days, not 180 days. The resulting dividend is 90 days, not 45 days.
In his traverse and denial, petitioner presents a new argument: that he is entitled to restoration of 180 days credit because the statute in force when the offense was committed *583 allowed restoration of 180 days of forfeited credit, and the regulation that restricted restoration to 25 percent was illegal because it contradicted the statute. (See In re Reina (1985) 171 Cal.App.3d 638, 644, 217 Cal.Rptr. 535, cited in In re Winner, supra, 56 Cal.App.4th at p. 1487, 66 Cal. Rptr.2d 333.) But petitioner overlooks the statutory restriction in the former version of section 2933, subdivision (c): only forfeited credits eligible for restoration under the regulations had to be restored. The statute gave the Director discretion in deciding what percentage of credits was restorable (so long as the amount did not exceed 50 percent), and the Director exercised that authority by specifying 25 percent for "A-1" offenses.
We conclude that petitioner is entitled to restoration of 90 of the 360 days forfeited credit. Since 45 days already have been restored, he is entitled to restoration of an additional 45 days.

DISPOSITION
The petition for writ of habeas corpus is granted. The Director of the Department of Corrections is directed to restore an additional 45 days of petitioner's 360 forfeited credits, so that the total amount restored is 90 days.
CHARLES S. VOGEL, P.J., and CURRY, J., concur.
