This case is before us on a petition for extraordinary relief in the nature of a writ of habeas corpus. Dettinger v. United States, 7 M.J. 216 (C.M.A.1979); Hart v. Kurth, 5 M.J. 932 (N.C.M.R.1978). Petitioner contends that he is entitled to 78 days of administrative credit for the time he spent in pretrial confinement because he was housed with sentenced prisoners and compelled to perform the same work under the same conditions as the sentenced prisoners. The administrative credit requested would qualify petitioner for immediate release from confinement. For the reasons expressed infra we decline to grant petitioner the relief requested.
Petitioner is currently serving a sentence of confinement at hard labor awarded by members at a general court-martial tried on 25 October 1982. He was placed in pretrial confinement on 5 August 1982 and remained in that status until the date of trial. During the period of pretrial confinement, petitioner was completely integrated into the general prisoner population, apparently performing the same duties under the same conditions as the sentenced prisoners. This *843treatment of petitioner was authorized by Corrections Manual, SECNAYINST 1640.9, paragraph 404.3d, which in part provided that a pretrial detainee may be assigned to the same nonpunitive police, fatigue, and work details as sentenced prisoners if he executes a written waiver of his right to separate treatment.1 Petitioner executed such a waiver on 5 August 1982, the initial date of pretrial confinement.
The attachments to petitioner’s clemency request indicate that petitioner’s assigned duties were generally limited to projects performed within the brig facility, with about 22 days devoted to details performed outside the brig. No evidence is presented specifically describing the conditions the work details were subjected to nor do the attachments provided by petitioner indicate the status of the members of the work details to which petitioner was assigned.
Article 13, Uniform Code of Military Justice (UCMJ), 10 U.S.C. § 813, prohibits the punishment of a servicemember held in pretrial confinement. “Congress has [thus] decreed that, until convicted, one charged with a crime shall not be subjected to punishment. ...” United States v. Bruce, 14 M.J. 254, 256 (C.M.A.1982), quoting United States v. Bayhand, 6 U.S.C.M.A. 762, 773, 21 C.M.R. 84, 95 (1956). A regulation purporting to authorize the waiver of Article 13, UCMJ, rights is in contravention of that provision and is therefore invalid. See United States v. Bayhand, supra at 770, 21 C.M.R. at 92.
The Corrections Manual provision, supra, however, is not violative of Article 13, UCMJ, in that its waiver authorization is specifically limited to nonpunitive activities. Nevertheless, we must still examine the conditions of petitioner’s confinement to determine whether they were so onerous as to constitute punishment in violation of Article 13, UCMJ. See United States v. Bruce, supra at 256. The following guidance has been provided by the Supreme Court in reaching such a determination:
A court must decide whether the disability has been imposed for the purpose of punishment or whether it is but an incident of some other legitimate governmental purpose.... [I]f a particular condition or restriction of pretrial detention is reasonably related to a legitimate governmental objective, it does not, without more, amount to “punishment.” Conversely, if a restriction or condition is not reasonably related to a legitimate goal— if it is arbitrary or purposeless — a court permissibly may infer that the purpose of the governmental action is punishment that may not constitutionally be inflicted upon detainees qua detainees. (Citations and footnotes omitted).
Bell v. Wolfish, 441 U.S. 520, 538-39, 99 S.Ct. 1861, 1873-74, 60 L.Ed.2d 447 (1979). Cf. United States v. Southers, 12 M.J. 924 (N.M.C.M.R.1982) (where this Court recommended a similar analysis to a trial court presented with the question of whether the treatment of a pretrial detainee constitutes punishment).
With this guidance in mind, we conclude that the commingling of petitioner with sentenced prisoners was nonpunitive in nature as it was not arbitrary but reasonably related to a legitimate governmental objective. The full employment of service personnel, including pretrial detainees, is necessary to maintain an effective fighting force. There is nothing unreasonable with the commingling of pretrial detainees and sentenced prisoners in obtaining this objective in the most efficient manner possible, limited, of course, by the prohibition against the punishment of pretrial detainees.
In the instant case, no evidence is presented which indicates that petitioner was subject to confinement at hard labor or any other sanction that has been traditionally imposed upon a sentenced prisoner. To the contrary, while no specific details of the work performed by petitioner have been provided for our evaluation, the attach*844ments submitted appear to reflect that he merely participated in routine nonpunitive police, fatigue, and work details during the entire period of pretrial confinement.
We observe that a different result was reached in United States v. Bayhand, supra, and United States v. Nelson, 18 U.S. C.M.A. 177, 39 C.M.R. 177 (1969). The Courts in those cases based their decisions on a presumption that work performed by sentenced prisoners is per se punishment. As stated in Bayhand:
Certainly the inference is compelling that the sentenced members of the work detail were being subjected to punishment, for it is the primary function of confinement officials to insure the serving at hard labor of sentences given as punishment. ... Therefore, if an unsentenced prisoner works under identical conditions, it is fair to assume he, too, is being punished.
Id. at 770-71, 21 C.M.R. at 92-93. Such a presumption, especially in light of the emphasis placed today upon the rehabilitation, training, and education of servicemembers confined to brig facilities, see generally Corrections Manual, SECNAVINST 1640.-9A, is untenable. We believe the more reasonable approach, as apparently adopted by the Court of Military Appeals in United States v. Bruce, supra, and as applied in the instant case, is for the deciding court to examine the working conditions imposed upon the particular pretrial detainee and then determine whether such conditions constitute impermissible punishment. See id. at 256.
Accordingly, the petition for habeas corpus is denied.
. The 1983 version of the Corrections Manual, SECNAYINST 1640.9A, contains the same provision at paragraph 6309.3.