In consonance with his pleas, appellant was found guilty of violations of Articles 86 and 121, Uniform Code of Military Justice, 10 U.S.C. §§ 886, 921, and aggravated assault in violation of Article 128, Uniform Code of Military Justice, 10 U.S.C. § 928. The convening authority approved the absence and larceny findings but approved only a finding of simple, rather than aggravated, assault. The sentence, which provided for confinement at hard labor for fifty days, forfeiture of $250.00 pay per month for three months, and a bad-conduct discharge, was also approved as being within the ambit of the pretrial agreement.
Appellant now alleges a single error: THE JUDGE ERRONEOUSLY LIMITED HIS INQUIRY INTO THE PRETRIAL CONFINEMENT’S ILLEGALITY TO THE QUESTION OF WHETHER THE MAGISTRATE ABUSED HIS DISCRETION, BASED ON THE EVIDENCE BEFORE HIM.
We do not agree and affirm.
The pertinent facts appear simple enough. Immediately after his apprehension for the alleged commission of the aggravated assault offense, appellant was incarcerated. Three days thereafter, a military magistrate was appointed and a hearing conducted to determine the legality of the confinement. At that hearing the magistrate decided in favor of continued incarceration.
At trial, some 38 days after the hearing conducted by the magistrate, appellant, through written pleadings filed prior to trial by his detailed defense counsel, moved *544“for appropriate relief from illegal pretrial confinement,” praying for a “five-for-one credit on his sentence for each day of pretrial confinement” in the event a conviction resulted in the case. At the Article 39(a), UCMJ, 10 U.S.C. § 839(a), session held subsequent to arraignment, appointed defense counsel again moved the court “for appropriate relief from illegal pretrial confinement.” However, that counsel took the position that the trial judge should review the matter de novo, a step which that jurist declined to take. It is that failure which appellant challenges here.
It is pertinent to note at the outset, that at trial appellant did not move the court to order his release from pretrial confinement; rather, the relief he sought was that of a credit against the possible sentence to be imposed in the event of conviction to compensate him for the alleged illegality. Had the thrust of appellant’s motion at trial been that of immediate release from confinement, any failure by the trial judge to review all then existing facts and circumstances relevant to the issue of confinement legality would have been error. See Cooke, The United States Court of Military Appeals, 1975-1977: Judicializing the Military Justice System, 76 Mil.L.Rev. 43, 84-87 (1977), and cases cited therein.
However, in that appellant chose instead the requested remedy of an administrative credit with respect to existing incarceration, he cannot now be heard to allege that the trial judge’s limitation on his review of the magistrate’s ruling, utilizing an abuse of discretion standard, was error. In so ruling we do not subscribe to the position of appellate Government counsel that, had appellant chosen to seek release from pretrial confinement subsequent to the adverse ruling by the military magistrate, resort would have properly been had to the same or another magistrate. This is so especially in cases as the one at bar, where the case is being heard by a forum with power to order such release if warranted. Were we to hold otherwise, the judicial process might well be disrupted by any accused who, although scheduled for trial, could unilaterally gain a postponement of trial proceedings by simply petitioning a military magistrate for review of a prior adverse incarceration decision. Cf. United States v. Carmel, 4 M.J. 744 (N.C.M.R.1978) at 746, and cases cited therein.
The genesis of the Navy-Marine Corps Military Magistrate Program is found in Courtney v. Williams, 1 M.J. 267 (C.M.A. 1976), which requires that a neutral and detached magistrate determine whether probable cause exists to detain, whether the person could be detained, and whether he or she should be detained. The rationale for the Court’s decision, was premised on what the Court perceived as a hiatus in the Code —namely, no provision for the review of the decisions of confinement-ordering officials. See Courtney v. Williams, supra, at 270-271. The duties and responsibilities of the quasi-judicial officer, charged with the initial inquiry into the legality of pretrial confinement, do not displace the function of the trial judge in dealing with diverse preliminary matters affecting incarceration, where such matters arise after referral of charges to his court. Id. at 271-272 (Ferguson, S.J., concurring); ABA Standards, The Function of the Trial Judge §§ 3.2 and 3.3 (1974). To say that since a magistrate initially ruled upon the legality of appellant’s pretrial confinement that the same or another magistrate must always be the official to whom application is made for review of the initial determination, on the same or new factual predicate, irrespective of the point in the judicial proceedings at which the matter is raised, would frustrate the intent of both Courtney, supra, and the Secretary of the Navy in establishing the Navy-Marine Corps Military Magistrate Program with SECNAVNOTICE 5810 of 15 October 1976. That directive mandates finality of the magistrate’s ruling only insofar as confinement officials are concerned; there is no intimation that the magistrate’s authority was given to him in an attempt to usurp powers traditionally reposing in the trial judge. See paras. 39b and 69a, Manual for Courts-Martial, United States, 1969 (Revised edition); but see Courtney v. Wil*545liams, supra, at 271-273 (Cook, J., concurring in the result). This is especially true in cases such as this where the application for the requested relief comes at trial, a proceeding presided over by a judicial officer who possesses those inherent powers which could, in a proper case, effectuate release from incarceration of courts-martial detainees. In fact, none of Courtney's progeny suggest that a military judge, detailed for the trial of a case, could not take steps to effectuate the release of an accused illegally confined. See, e. g., United States v. Larner, 1 M.J. 371 (C.M.A.1976); United States v. Heard, 3 M.J. 14 (C.M.A.1977); United States v. Burke, 4 M.J. 530 (N.C.M. R.1977).
With respect to the error as assigned before this Court the military judge was correct in limiting his consideration of appellant’s pretrial confinement to whether or not the military magistrate abused his discretion in determining that continued confinement was justified. Accordingly, the findings, as modified below, and the sentence are affirmed.
Senior Judge GREGORY concurs.