OPINION OF THE COURT
PAULEY, Judge:First Lieutenant (1LT) Autrey was tried by a general court-martial composed of officer members. Contrary to his pleas, he was convicted of one specification each of attempted larceny, larceny, and filing a false claim, four specifications of conduct unbecoming an officer, and two specifications of making a false statement.1 He was sentenced to be dismissed from the service. The convening authority approved the sentence.
The appellant’s excellent brief on appeal assigns six errors for our consideration. One of the assigned errors is that the selection process for court members resulted in the impermissible exclusion of company grade officers. We agree with that assertion of error and will grant relief which obviates the necessity for discussion of the remaining errors.
I.
The court-martial convening order in this case detailed only field grade officers as members of the panel. The staff judge advocate, in his pretrial advice to the convening authority, enclosed a list of field grade officers2 and recommended that nine officers from that list be detailed to appellant’s case. The last sentence of the pretrial advice, referring to this list, reads as follows:
Company grade officers are excluded from the list and recommend that no company grade officers be detailed as 1LT Autrey is well-known among them on this installation.
At trial, the appellant’s defense counsel made a timely objection to the exclusion of company grade officers in the form of a motion for appropriate relief. The motion was denied, forming the basis for the assigned error under discussion. The government counsel, notwithstanding trial defense counsel’s obvious preference for a stipulation of testimony, insisted on calling the staff judge advocate as a witness.3 *914The staff judge advocate testified that he “personally handcarried” the pretrial advice to the convening authority “and was present when [the convening authority] approved the recommendations that were made in the pretrial advice.” In response to a question by government counsel as to specific recommendations made to the convening authority, the staff judge advocate answered as follows:
A. I made a specific recommendation to the convening authority, General Fiala, that at the time he decided whether or not to refer the case to trial that he consider selecting a panel limited to senior and field grade officers, and I made that recommendation based on two reasons. One, with the number of captains who are assigned to Fort Leonard Wood, somewhere in the neighborhood of 220-250, a tremendously large portion thereof are ineligible to sit as court-martial panel members because of their various positions, be it MEDDAC, Military Police, Chaplain, Doctor, et cetera, and that with the remaining captains, a good number of them who are unit commanders and all of whom know each other and possibly be conferring with each other about the case, that it would be extremely difficult to attempt — for him to attempt to determine who could function in a completely unbiased manner as a member of a court. The second reason for my recommendation that he limit the selection to field grade officers was that the charges were serious enough and that the accused should have the benefit of having the most mature, sound, and competent court members to consider the facts and make a determination. And I — I felt that senior more experienced officers could do that.
Q. Was that your recommendation to the convening authority, sir?
A. I made that specific recommendation to the convening authority, and the selection of court members by the convening authority at that time indicates that he agreed with the rationale.
The staff judge advocate further testified that this was the first case in some two and one half years where the convening authority had excluded a particular group of officers; that the convening authority was aware of his ability to select a court member not on the recommended list and, in fact, had done so on one occasion. He stated that the staff judge advocate’s pretrial advice was only advisory and not binding on the convening authority. The staff judge advocate indicated that the convening authority had followed his advice since the convening authority did not, in fact, select any company grade officers.
In a written brief and in oral argument presented to the military judge, government trial counsel stated that of the approximate 220 captains assigned to the installation “over 130” were ineligible for detail to a court-martial panel because of exemption by virtue of their assigned duties.4 The trial defense counsel agreed that an assigned count of “220-250 captains on post” was reasonably accurate but was unwilling to agree that 130 of those officers were exempt from court-martial duty. We note the common practice of exempting officers for duty as court members because of their duty status and will assume that a substantial number, perhaps half of those assigned as alleged by government counsel, would be so excluded.
At the time of trial, appellant had been selected for promotion to captain. Therefore, he would have been senior in rank to all of the installation second lieutenants and virtually all of the first lieutenants. Those officers would have been excluded for detail as court members by reason of Article 25(d)(1), Uniform Code of Military Justice (UCMJ) 10 U.S.C. § 825(d)(1).5 The practical effect of the convening authority’s action of excluding company grade of*915ficers would be to exclude all of those officers in the grade of captain and perhaps a very limited number of first lieutenants.
II.
Article 25(d)(2), UCMJ, provides in pertinent part:
When convening a court-martial, the convening authority shall detail as members thereof such members of the armed forces as, in his opinion, are best qualified for the duty by reason of age, education, training, experience, length of service and judicial temperament.
Our courts have held that this provision of the UCMJ gives wide latitude to the convening authority in the selection of court members. See, e.g., United States v. Crawford, 35 C.M.R. 3, 19 (CMA 1964) (Kilday, J., concurring). Further, it is unarguable that the statutory intent is to provide those who are “best qualified” to serve as court members at a court-martial. However, the Court of Military Appeals has long held that some limitations on the selection of court members are necessary. In United States v. Hedges, 29 C.M.R. 458 (CMA 1960), the court reversed a murder conviction where seven of the nine court members had primary duty assignments involving some aspect of crime prevention, detection, or control. In an earlier case, United States v. Sears, 20 C.M.R. 377 (CMA 1956), the appointment of three judge advocate attorneys to a court panel was deemed to be error. The practice of appointing members “hand-picked” by the government in order to hopefully provide a particular result — court-packing—has been justifiably condemned.
The issue of exclusion of a particular class of individuals from consideration for duty as court members, and whether this constitutes court-packing, has been the subject of considerable litigation in our military justice system. United States v. Crawford, 35 C.M.R. 3, squarely faced the issue of systematic exclusion of lower-ranking enlisted personnel for appointment as court members and decided that such a system is acceptable only where “the only purpose in looking to the senior noncommissioned ranks was to obtain persons possessed of proper qualifications to judge and sentence an accused.” Id. at 12. The apparent ratio decidendi was that “there was no desire or intention to exclude any group or class on irrelevant, irrational, or prohibited grounds.” (Emphasis supplied.) Id. The court reasoned that the statutory qualifications for court membership, especially “training, experience, and length of service,” so closely related to seniority in rank that to look first to the senior noncommissioned ranks is not an impermissible choice. In United States v. Greene, 43 C.M.R. 72 (CMA 1970), although the court appeared to apply the rule in Crawford, it instead held for the appellant because the staff judge advocate recommended to the convening authority that he select a panel from a list of officers which included only those in the grade of colonel and lieutenant colonel. The court held that an improper standard was used for selection of court members and noted that the “composition of this court was a clear departure from past practices and was dictated solely by the contents of the SJA’s memorandum.” Id. at 78.
A system of excluding lieutenants and warrant officers from court-martial membership was successfully challenged in United States v. Daigle, 1 M.J. 139 (CMA 1975). There the court noted “that members were selected not because they actually possessed the qualities enumerated in Article 25(d)(2) but solely because they had the senior rank deemed desirable for a particular court-martial.” Id. at 141. In other words, there was no reasonable relationship between exclusion and the standards for selection as set out in the UCMJ. The court indicated that this “fixed policy” to exclude these officers was “opposite to the system approved in United States v. Crawford, supra, and identical to that condemned in Greene.” Id.
In United States v. Yager, 7 M.J. 171 (CMA 1979), the Court of Military Appeals again faced a situation where a group of *916otherwise qualified individuals was excluded from duty as court members solely because of their rank. In Yager, the convening authority had devised a system of “random jury selection” which excluded individuals serving in the enlisted grades of Privates E-l and E-2. The appellant in Yager argued that this exclusion was of the same arbitrary nature as had earlier been condemned in Daigle. The court, in distinguishing Daigle, approved the reasoning of the Army Court of Military Review where that court concluded that this exclusion by “use of rank is nothing more than a shorthand way of stating that those persons do not meet the statutory qualifications____” United States v. Yager, 2 M.J. 484, 487 (ACMR 1975). The Court of Military Appeals quoted from the lower court’s opinion as follows:
[T]he disqualification of privates is an embodiment of the application of the statutory criteria — age, education, training, experience, length of service, and judicial temperament. Persons in the grade of private are normally in one of the following categories: they have only a few months service; or although having sufficient service they have failed promotion because they have shown no ability, aptitude, or intelligence; or they have been reduced in grade for misconduct or inefficiency. Privates are in the initial training cycle of their military service, preparing themselves to become useful, productive soldiers. They are in a strange environment, many away from home for the first time, and subject to the pressures inherent in a stressful, strict disciplinary situation.
United States v. Yager, 7 M.J. at 172. The Court of Military Appeals also considered as important the fact that at time of trial promotion to E-2 was automatic after four months of service, unless affirmative action was taken by the commander to prevent such advancement. Based on these facts, Judge Cook, writing for the court, concluded “that there was a demonstrable reason for the exclusion of these grades reasonably related to the criteria for qualification under Article 25(d)(2), because the application of these criteria would exclude most, if not all, of the grades involved.” Id. at 173. As an indication of the importance of such a nexus, the court further stated:
However, the exclusion of specific ranks is suspect and absent the application of Article 25(d)(1), there must be a demonstrable relationship between the excluded ranks and the criteria of Article 25(d)(2). Indeed, if a circumstance should arrive where servicemen are serving in the grades of E-l and E-2 as a result of more rigorous requirements for promotion, the requisite relationship could be wanting.
Id.
III.
Considering these several cases that constitute our precedent, we must now turn to a discussion of the case sub judice. Of the two reasons given by the staff judge advocate to exclude company grade officers, only one deserves discussion at length. The staff judge advocate stated in his pretrial advice and in testimony at trial that the appellant was “well known” to company grade officers and it would be difficult for the convening authority to determine which of those officers might, in some way, be biased and therefore ineligible to sit as a court member. This theory of exclusion not only lacks a foundation in law but also is somewhat unreasonable. It strains credulity to imagine that the appellant might have been personally acquainted with each of the approximate 100 eligible captains to the extent that they would be unable to sit as members of his court-martial. Even were he to be such a social butterfly, we agree with the defense that this is a matter properly addressed during voir dire proceedings. We specifically reject as impermissible under the UCMJ any system of selection of court members which excludes a class of persons because they might be “known” to the accused either socially, professionally, or because they can be identified as belonging to some general category of individuals that includes the accused.
*917Although not mentioned in the pretrial advice, the staff judge advocate testified at trial that his second reason for selecting only field grade officers was so “the accused could have the benefit of having the most mature, sound, and competent court members to consider the facts and make a determination.” Applying the legal principles set out in Yager, we must test to see whether there is a demonstrable relationship between the excluded ranks and the criteria of Article 25(d)(2). We conclude that there is no such relationship. Unlike the excluded privates in Yager, the excluded captains would likely be well qualified under the statutory criteria of age, education, training, experience, length of service, and judicial temperament. With all due respect to the backbone of our Army— the private — it is an easy task to distinguish the two categories of personnel. Unlike privates, the great majority of captains would have had several years of service and would have been promoted on a competitive rather than an automatic basis.6 In fact, those captains with limited years of service would most likely be found in the group not eligible for court-martial duty by reason of duty status.7 Virtually all of our Army captains would be college graduates and many would have received substantial military schooling. It is likely that many would have had military legal experience to include duty as a court member. Finally, it almost goes without saying that their military experience might also include duty positions of substantial responsibility such as that of a company commander or battalion staff officer. In short, the idea that those in the grade of captain may be excluded from court-martial duty on the theory that they do not meet the statutory criteria as set out in Article 25(d)(2) has no basis in fact or logic.8
IV.
We hold that the selection process for court members in appellant’s case was not in conformance with Article 25(d)(2), UCMJ, and resulted in the impermissible exclusion of company grade officers. We recognize that the improper selection of court members does not necessarily require invalidation of the entire trial. United States v. Daigle, 1 M.J. 139. However, where, as in this case, the accused elects to be tried before members and pleads not guilty; and where the exclusion of members by rank is deliberate and suspect, we find that the entire proceedings were sufficiently affected by the trial judge’s erroneous ruling so as to require the setting aside of the findings and sentence.
The findings of guilty and the sentence are set aside. A rehearing may be ordered by a different convening authority.
Judge WERNER concurs.. In violation of Articles 80, 121, 132, 133 and 134, Uniform Code of Military Justice, 10 U.S.C. §§ 880, 921, 932, 933 and 934, respectively.
. The list contained the names of seven colonels, seven lieutenant colonels, and six majors.
. The mystery of trial defense counsel's desire to stipulate is solved just prior to cross-examination of the staff judge advocate when the defense counsel states:
Your honor, I’d like it noted on the record, first of all, that Colonel K is my senior rater, and my questioning of him puts me in an awkward position, something which I hope (sic) to avoid by stipulating to Colonel K’s testimony; however, I'd also like it noted on the record that the fact that Colonel K is my senior rater shall not cause me to be less an advocate in cross-examining Colonel K.
(Emphasis supplied.)
Although the court-martial convening order indicates that the trial defense counsel is assigned to the U.S. Army Trial Defense Service, he introduces himself during voir dire proceedings as being "currently assigned as Chief of the Legal Assistance (sic) here at Fort Leonard Wood.” We would only note, parenthetically, with respect to this situation that defense counsel’s desire to stipulate may have, in fact, made him "less an advocate” for it may not necessarily have been in the best interest of his client to so stipulate, although that question is moot as the staff judge advocate did testify. However, the defense counsel's obvious reluctance illustrates the tremendous value of the Trial Defense Service to our system of justice and the need to avoid situations, such as that which occurred here, whenever possible.
. The brief cites those who were ineligible as medical service officers, judge advocates, military police, inspector general, and chaplain officers.
. Article 25(d)(1). When it can be avoided, no member of an armed force may be tried by a court-martial any member of which is junior to him in rank or grade.
. For example, the appellant in this case, a first lieutenant on the list for promotion to captain, had over three years of service at time of trial.
. Judge advocates and medical corps officers are possible examples.
. It may be that a case could be made to exclude second lieutenants as a class under the rationale set out in United States v. Yager, 7 M.J. at 171, but that is a question that we need not address in this opinion. Speaking in obiter dicta, we would disapprove of such a method of exclusion.