
103 Cal.App.3d 621 (1980)
163 Cal. Rptr. 201
In re JAMES HENRY HAWKINS on Habeas Corpus.
Docket No. 10407.
Court of Appeals of California, Third District.
March 21, 1980.
*622 COUNSEL
James Henry Hawkins, in pro. per., Ann Kanter, under appointment by the Court of Appeal, and Kanter, Williams, Merin & Dickstein for Petitioner.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Charles P. Just, Charles J. James, Nancy Sweet and Roger E. Venturi, Deputy Attorneys General, for Respondent.
OPINION
BLEASE, J.
Petitioner James Henry Hawkins challenges, by means of a writ of habeas corpus, a two-year enhancement of his maximum period of imprisonment, imposed on him by the Community Release Board (CRB)[1] pursuant to Penal Code section 667.5, subdivision (b), for having been in "prison custody" within five years of the commitment offense as service for prior felony convictions.
(1) The sole issue tendered is whether a period of placement in a Narcotics Treatment and Control Unit (NTCU), under the authority of *623 Health and Safety Code section 11561, without revocation of parole, is "prison custody" within the meaning of Penal Code section 667.5. We hold that it is not.

FACTS
On March 9, 1978, petitioner was convicted of a violation of Health and Safety Code section 11352 (sale of heroin), which occurred on March 10, 1977. He was committed to prison under the Indeterminate Sentence Law (ISL). The violation took place five years and one month after petitioner's release on parole (Feb. 11, 1972) from commitments for four prior felony convictions.
In 1972, within the five-year period, petitioner's parole officer discovered that he had attempted to obtain a narcotics prescription using an alias. Petitioner admitted the attempt and agreed to a "dry out" period. He was placed in the Narcotics Treatment and Control Unit (NTCU), pursuant to Health and Safety Code section 11561, on November 29, 1972. He was released on February 23, 1973. The commitment to NTCU did not result in prosecution for any offense and petitioner's parole was not revoked, suspended or cancelled under Penal Code section 3060. He was discharged from parole on December 13, 1976.
Following the adoption of the determinate sentence law (DSL) petitioner's maximum term of imprisonment was recomputed by the CRB under the provisions of Penal Code section 1170.2, subdivision (a), which incorporates the enhancement provisions of Penal Code section 667.5.
Petitioner's maximum term of imprisonment was increased by two years on the theory that within five years of the instant commitment offense he had not been free of prison custody. He received a release date of March 16, 1982. To meet the five-year requirement, the CRB counted as "prison custody" the period of time during which petitioner was placed in the NTCU pursuant to Health and Safety Code section 11561.[2]


*624 I
Section 667.5, subdivision (b), imposes upon a convicted felon an additional term of one year "for each prior separate prison term served for any felony; provided that no additional term shall be imposed ... for any prison term served prior to a period of five years in which defendant remained free of ... prison custody...." "Prison custody" is defined in section 667.5, subdivision (d): "For the purposes of this section the defendant shall be deemed to remain in prison custody for an offense until the official discharge from such custody or until release on parole whichever first occurs including any time during which the defendant remains subject to reimprisonment for escape from such custody or is reimprisoned on revocation of parole...." Petitioner did not escape from custody and, notwithstanding his 90-day confinement in an NTCU, he apparently remained a parolee in good standing from his parole on February 11, 1972, until his discharge on December 13, 1976.
If the issue is governed by the statutory definition of "prison custody," petitioner is entitled to relief. It is argued, however, that by force of other provisions of section 667.5 petitioner was not free of prison custody for the required five years.
An enhancement may be imposed, pursuant to section 667.5, subdivision (b), only for a "prison term served for any felony...." (Italics added.) Section 667.5, subdivision (h), defines "[s]erving a prison term [as including] any confinement time in any state prison ... as punishment for commission of an offense, including confinement in a hospital or other institution or facility credited as service of prison time...." Arguably, the confinements specified in section 667.5, subdivision (h), may be read as definitions of "prison custody."
Petitioner's confinement does not come within those set forth in section 667.5, subdivision (h). Although his NTCU confinement was authorized by virtue of his status as a parolee, and in that sense was a consequence of his prior convictions, he was not confined "as punishment for ... an offense" and hence his confinement was not service for any felony.
*625 Whatever the previous justifications may have been, it is clear now that the purpose of imprisonment for crime is punishment. (Pen. Code, § 1170.) However, the express purposes of an NTCU are "study, research, and treatment as may be necessary for control of the addiction or imminent addiction to controlled substances of persons committed to the custody of the Director of Corrections...." (Health & Saf. Code, § 11560.) Detention of a parolee for treatment in an NTCU "shall not be deemed a suspension, cancellation or revocation of parole until such time as the [Board of Prison Terms] so orders...." (Health & Saf. Code, § 11561.)
Here there was no order of suspension, cancellation or revocation of petitioner's parole. Had there been, it would have extended petitioner's maximum period of parole (Pen. Code, § 3000, subd. (d)). In that event, the purpose of the confinement might more appropriately be characterized as punishment. (See Pen. Code, § 667.5, subds. (d) and (g).) Since petitioner's parole status remained unaffected by his NTCU confinement, the purpose of such confinement was manifestly treatment, not punishment.
Although the NTCU in which petitioner was confined is located at Folsom Prison, a state prison, the place of confinement cannot be regarded as dispositive. The Department of Corrections is authorized to establish Narcotic Treatment and Control Units "in state correctional facilities ... or as separate establishments. ..." (Italics added; Health & Saf. Code, § 11560.) The record does not reveal whether such units have been established outside the prisons. Assuming they have, the critical question whether an individual has been free of prison custody cannot turn on an event so haphazard as an administrator's designation of a particular NTCU for his confinement from among several which are physically located both inside and outside state prison facilities. (See, e.g., In re Kapperman (1974) 11 Cal.3d 542 [114 Cal. Rptr. 97, 522, P.2d 657].)
We find no merit in petitioner's other contentions and conclude that petitioner is correct in asserting that his prison term was improperly enhanced under Penal Code section 667.5 on the basis of his placement in an NTCU while on parole.
Let an order issue directing the Board of Prison Terms to recompute petitioner's sentence consistent with this opinion. The order to show *626 cause, having served its purpose, is discharged. Since petitioner is not entitled to immediate release the writ is denied.
Puglia, P.J., and Janes, J.,[*] concurred.
NOTES
[1]  The Community Release Board has been renamed the Board of Prison Terms, effective January 1, 1980. (Stats. 1979, ch. 255.)
[2]  "When the Adult Authority concludes that there are reasonable grounds for believing that a man on parole is addicted to, or is in imminent danger of addiction to, controlled substances it may issue an order to detain or place such person in a controlled substance treatment control unit for a period not to exceed 90 days. Such order shall be a sufficient warrant for any peace officer or employee of the Department of Corrections to return to physical custody any such person. Detention pursuant to such order shall not be deemed a suspension, cancellation or revocation of parole until such time as the Adult Authority so orders pursuant to Section 3060 of the Penal Code. A parolee taken into physical custody pursuant to Section 3060 of the Penal Code may be detained in a controlled substance treatment control unit established pursuant to this article." (Health & Saf. Code, § 11561.)
[*]   Retired Associate Justice of the Court of Appeal sitting under assignment by the Chairperson of the Judicial Council.
