The single dispositive issue in this case involves the legality, under Title VII of the Civil Rights Act of 1964, 42 U.S.C. § 2000e et seq., of a two-year pilot study conducted by the California Highway Patrol (CHP) between 1974 and 1976 to determine the feasibility of employing women as CHP traffic officers. The CHP and Craig, Commissioner of the CHP, appeal from the district court’s grant of summary judgment for La Riviere. We reverse.
I
The facts underlying this controversy are not in dispute. Prior to 1974, women were completely excluded from holding positions as CHP traffic officers. On March 22, 1973, a class action filed in the United States District Court for the Eastern District of California challenged this exclusion and the CHP’s 1973 male-only traffic officer examination on the basis of Title VII. Schultheis, et al. v. Ashcraft, et al., Civ. No. S-2758 (E.D.Cal., filed March 22, 1973). Pursuant to negotiations with the plaintiff class in Schultheis, the CHP agreed to hire and train 40 women to participate in a two-year pilot study designed to determine the feasibility of employing women as traffic officers. On June 20, 1974, the CHP announced that it would conduct a women-only examination in order to select the women who would participate in the pilot feasibility study. On July 9, 1974, the California legislature enacted Cal.Veh.Code § 2266, which ordered the CHP to conduct such a feasibility study and report its conclusions to the legislature. The statute authorized the creation of a special class of female CHP officers and their assignment to full patrol duty.1 Because it was classified as an “urgency” statute, section 2266 became effective immediately upon the approval of the Governor on that same day.
On July 20,1974, the CHP conducted an eligibility examination limited to female applicants. La Riviere, a male, applied for but was not permitted to take this examination. On September 30, 1974, the CHP hired the 40 women who scored highest on this examination, along with 40 men chosen from a pre-existing list of over 1,600 eligible males, for participation in the pilot feasibility study. La Riviere was not selected as one of the 40 men to participate in the study, because he had not applied for or taken the 1973 traffic officer examination. Thus, he was not on the CHP’s eligibility *1277list. Some of the CHP’s physical eligibility requirements, including minimum height and weight standards, were apparently lowered in order to permit the women to be eligible for positions as traffic officers.2
Following the examination and the beginning of the feasibility study, the district court presiding over the Schultheis action entered an order, agreed to between the parties, which stayed all proceedings until the study was concluded. Less than two years after that study began, the CHP represented to the district court that it had already concluded that the study had successfully proved that women, as a class, could safely and efficiently perform the duties required of CHP traffic officers. Accordingly, the district court entered judgment for the plaintiff class in Schultheis on May 5, 1976, and ordered that all subsequent examinations be open to both men and women. Beginning in February of 1977, CHP examinations were open to both men and women, and the male-only eligibility requirement was eliminated.3
On December 2,1976, after judgment was entered in the Schultheis class action, La Riviere filed a third amended complaint in the District Court for the Northern District of California. This complaint named as defendants the United States Equal Employment Opportunity Commission and its chairman, the United States Department of Labor and its secretary, the California Fair Employment Practices Commission and several of its members, the CHP and Craig, as well as several other California agencies, their members, and certain California municipalities. The complaint alleged violations of the due process clause of the fifth amendment and the due process and equal protection clauses of the fourteenth amendment, 42 U.S.C. §§ 1981 and 1982, and Title VII, and sought declaratory, injunctive and monetary relief.
As a result of several motions, all defendants other than the CHP and Craig were eliminated from the case by way of summary judgment or dismissal of the complaint with prejudice. The CHP and Craig were named only in the eighth claim of the complaint. This claim alleged a violation of Title VII arising from the CHP’s failure to allow La Riviere to take the 1974 women-only examination and participate in the pilot feasibility study; it did not allege a violation of the equal protection clause. Upon cross-motions for summary judgment, raising only the legal question of whether the pilot feasibility study violated Title VII, the district court entered summary judgment for La Riviere, and awarded $33,360 as “backpay,” but denied any additional relief. The CHP and Craig filed a timely notice of appeal from this final judgment. We have jurisdiction pursuant to 28 U.S.C. § 1291.
II
The grant of a motion for summary judgment raises a freely reviewable ques*1278tion of law. We will reverse a summary judgment if the moving party failed to establish that no genuine issue of material fact remained for trial or if the moving party as a matter of law was not clearly entitled to prevail. Server v. Interpace Corp., 657 F.2d 1115, 1117 (9th Cir. 1981); Gaines v. Haughton, 645 F.2d 761, 769-70 (9th Cir. 1981). In this case, the cross-motions for summary judgment were submitted on the basis of the undisputed facts, and raised only the question of whether La Riviere’s complaint stated a claim upon which relief could be granted pursuant to Title VII. That issue turns on whether, under United Steelworkers of America v. Weber, 443 U.S. 193, 99 S.Ct. 2721, 61 L.Ed.2d 480 (1979) (Weber), the voluntary “affirmative action” program conducted by the CHP discriminated against La Riviere on the basis of sex in violation of Title VII. See Baker v. City of Detroit, 504 F.Supp. 841, 843 n.1 (E.D.Mich.1980).
In Weber, the Supreme Court considered whether a private, voluntary affirmative action program, which reserved for black employees 50% of the openings in an in-plant craft-training program pursuant to a collective-bargaining agreement between the employer and a union, violated Title VII.4 The Court concluded that although Title VII does not require employers in the private sector to implement affirmative action programs designed to eliminate manifest racial imbalances in traditionally segregated job categories, it does not prohibit all voluntary, race-conscious affirmative action.
Before deciding whether, under Weber, the pilot feasibility program conducted by the CHP is valid, we must address two initial questions concerning the applicability of Weber itself: first, whether Weber applies to an affirmative action program which discriminates on the basis of sex, rather than race; and second, whether Weber applies to an affirmative action program implemented by a state agency, rather than an employer in the private sector.5
While it has been stated that “the perception of racial classifications as inherently odious stems from a lengthy and tragic history that gender-based classifications do not share,” Regents of the University of California v. Bakke, 438 U.S. 265, 303, 98 S.Ct. 2733, 2755, 57 L.Ed.2d 750 (1978) (opinion of Powell, J.), it must not be forgotten that intentional sex discrimination in employment violates Title VII unless gender is a bona fide occupational qualification for the particular employment. 42 U.S.C. §§ 2000e-2(a), (e)(1). The provisions of Title VII respecting gender-based discrimination, however, are neutral; they prohibit discrimination against men, just as the analogous prohibition of racial discrimination makes unlawful discrimination against whites as well as blacks. Yet, although Title VII’s gender component was added as an amendment to the bill on the House floor, see 110 Cong.Rec. 2577-84 (1964), it is evident that this prohibition, along with other statutes such as the Equal Pay Act of 1963, 29 U.S.C. § 206(d), was enacted primarily to protect women against discrimination in the marketplace and to open employment opportunities for women in occupations that had traditionally been closed to them. See, e.g., Los Angeles Dep’t of *1279Water & Power v. Manhart, 435 U.S. 702, 707 & n.13, 98 S.Ct. 1370, 1375, & n.13, 55 L.Ed.2d 657 (1978); Corning Glass Works v. Brennan, 417 U.S. 188, 195, 94 S.Ct. 2223, 2228, 41 L.Ed.2d 1 (1974); Rosenfeld v. Southern Pacific Co., 444 F.2d 1219, 1225 (9th Cir. 1971). These purposes mirror those which underlie Title VII’s prohibition of racial discrimination. See Weber, supra, 443 U.S. at 202-03, 99 S.Ct. at 2727. Because the Court in Weber identified these purposes as manifesting a congressional intent not to prohibit voluntary affirmative action programs designed to correct racial imbalances in the work force, we must similarly conclude that Congress did not intend, when it added to Title VII the prohibition of gender-based employment discrimination, to prohibit voluntary affirmative action programs designed to correct longstanding sexual imbalances in the work force.
We turn now to whether Weber extends to affirmative action programs initiated by public employers. After reviewing the legislative history of Title VII, the Court in Weber concluded that Congress did not intend “to prohibit the private sector from taking effective steps to accomplish the goal that Congress designed Title VII to achieve.” Id. at 204, 99 S.Ct. at 2727 (emphasis added). The Court buttressed its conclusion by an examination of the legislative history and language of § 703(j) of Title VII, 42 U.S.C. § 2000e-2(j), from which it determined that “Congress did not intend to limit traditional business freedom to such a degree as to prohibit” all voluntary affirmative action programs. Id. at 207, 99 S.Ct. at 2729.
We need not infer from this, however, that the Court intended to limit Weber only to affirmative action programs implemented by private employers. States and their official agencies are equally subject to Title VII. The Equal Employment Opportunity Act of 1972, Pub.L.No. 92-261, §§ 2(1), (5), 86 Stat. 103, brought state civil service employees within the ambit of Title VII. 42 U.S.C. §§ 2000e(a), (f). We agree with the courts which have concluded that a voluntary affirmative action program implemented by a state employer will not violate Title VII if it is valid under Weber. See, e.g., Detroit Police Officers’ Ass’n v. Young, 608 F.2d 671, 688-90 (6th Cir. 1979), cert. denied, 452 U.S. 938, 101 S.Ct. 3079, 69 L.Ed.2d 951 (1981); Baker v. City of Detroit, 483 F.Supp. 930, 983-86, 986 n.105 (E.D.Mich.1979); Chmill v. City of Pittsburgh, 488 Pa. 470, 487-90, 412 A.2d 860, 869-71 (1980); Price v. Civil Serv. Comm’n, 26 Cal.3d 257, 273 n.12, 161 Cal.Rptr. 475, 485 n.12, 604 P.2d 1365, 1374 n.12, cert. dismissed, 449 U.S. 811, 101 S.Ct. 57, 66 L.Ed.2d 13 (1980); Maehren v. City of Seattle, 92 Wash.2d 480, 488-90, 599 P.2d 1255, 1261 (1979), cert. denied, 452 U.S. 938, 101 S.Ct. 3079, 69 L.Ed.2d 951 (1981). See also United States v. City of Miami, 664 F.2d 435, 461 (5th Cir. 1981) (en banc) (Johnson, J., concurring and dissenting) (“The fact that a private employer was involved in Weber does not significantly affect the applicability of the Weber rationale to this ease.”). In our view, allowing a governmental entity to take remedial steps to redress or eliminate past discrimination does substantially no greater violence to the concept of neutrality expressed in Title VII than does permitting private employers to take such steps.
Finding Weber applicable to this case, we turn now to an analysis of its holding. The Court did not “define in detail the line of demarcation between permissible and impermissible affirmative action plans.” Weber, supra, 433 U.S. at 208, 99 S.Ct. at 2729. Nonetheless, the Court did identify four features of the challenged affirmative action plan from which it concluded that the plan fell “on the permissible side of the line.” Id. These were: (1) that the plan was “designed to break down old patterns of racial segregation and hierarchy”; (2) that the plan did not “unnecessarily trammel the interests of the white employees” by requiring their discharge and replacement with new black hirees; (3) that the plan did not “create an absolute bar to the advancement of white employees”; and (4) that the plan was “a temporary measure . . . not intended to maintain racial balance, *1280but simply to eliminate a manifest racial imbalance.” Id.
It is clear that the two-year pilot feasibility program instituted by the CHP satisfies each of these requirements. First, the pilot program was designed to parallel the purposes of Title VII by breaking down old patterns of occupational segregation. Indeed, the discrimination in this case is even more clear than was the discrimination in Weber. There, the employer had not absolutely barred minorities from participation in craft positions; here, the CHP prior to 1974 absolutely barred women from consideration for positions as traffic officers. Second, the CHP program did not unnecessarily trammel the interests of male employees; it did not require discharge of any men and replacement by women. Indeed, it did not even unnecessarily trammel the interests of male applicants, because it allowed for the selection of 40 men for participation in the study program from a pre-existing eligibility list. Third, the CHP program did not absolutely bar the hiring or advancement of men. As in Weber, both male and female applicants were admitted into the program, with 50% of the program reserved for applicants from the discriminated group, here female. Furthermore, there is no showing of any subsequent impediment to male advancement as a result of the pilot program. Fourth and finally, the CHP program was of temporary duration. It existed only for the two-year period during which the feasibility of employing women as CHP traffic officers was studied. Following its successful completion, the pilot program was terminated and all subsequent examinations for the positions were open to members of both sexes. Thus, the program was not “intended to maintain [sexual] balance” in the work force, Weber, supra, 433 U.S. at 208, 99 S.Ct. at 2730, but rather was intended only to determine the feasibility of eliminating the principal restriction which had created a sexually imbalanced work force in the first place.
We hold that a state and its official agencies may institute a voluntary, bona fide affirmative action program, such as involved in this case, which is designed to remedy past gender-based employment discrimination. Where, as here, such a plan satisfies the four criteria articulated in Weber, the plan may be utilized consistently with Title VII without giving rise to liability to applicants who are excluded from the program solely because they belong to the opposite sex. Therefore, La Riviere’s complaint failed to state a claim upon which relief could be granted under Title VII. We accordingly reverse the district court’s entry of summary judgment for La Riviere, and remand with direction to enter judgment in favor of the CHP and Craig.
REVERSED.
. Cal.Veh.Code § 2266(b). Section 2266 was originally introduced in March of 1974 as S-1859. The complete, uncodified statute, including its designation as an urgency measure, may be found at 1974 Cal. Stats, ch. 417, §§ 1-3.
. This was authorized by Cal.Veh.Code § 2266(a), which provides that the feasibility study “shall also consider the appropriate hiring standards, including physical factors, and performance measures to be utilized with reference to the individuals that are the subject of the study.”
While the nature of his argument is not free of doubt, to the extent that La Riviere’s theory of recovery rests upon the effect which these lowered physical standards had on his application, we conclude that he lacks standing to raise the issue. We hold in this opinion that La Riviere’s exclusion from the female test group did not violate Title VII. As to the male test group, there can be no allegation that the selection of these 40 men from the unchallenged eligibility list discriminated against La Riviere in violation of Title VII. Therefore, La Riviere has not suffered any direct injury as a result of the arguably preferential treatment provided the women with respect to the physical eligibility requirements. The only men who might have standing to raise this issue would be the next 40 men on the eligibility list.
. La Riviere was unsuccessful in two later attempts to become a CHP officer. His applications for the 1977 and 1979 examinations were accepted. He failed, however, to take the steps necessary to complete the application process: in 1977 he participated in the scheduled written examination but did not appear for a scheduled interview; in 1979 he did not participate in the scheduled written examination and was therefore eliminated from consideration. Neither of these rejections is challenged in this case.
. It could be argued alternatively that this case differs from Weber in that the “affirmative action” program in Weber was adopted voluntarily pursuant to a collective-bargaining agreement, while the program in the instant case arose from a consent decree negotiated by the parties to a litigation and approved by the court. See Weber, supra, 443 U.S. at 200, 99 S.Ct. at 2726 (“[S]ince the Kaiser-USWA plan was adopted voluntarily, we are not concerned with what Title VII requires or with what a court might order to remedy a past proved violation of the Act.”). The CHP has appeared to draw this distinction in arguing that the feasibility study cannot violate Title VII because it was conducted pursuant to the order of the district court in Schultheis. Because of our disposition of the Weber issue, see infra, we do not reach this alternative argument.
. Compare Int’l Brotherhood of Electrical Workers v. City of Hartford, 625 F.2d 416, 424-25 (2d Cir. 1980) (assuming without discussion that Weber applied to city’s affirmative action plan for racial minorities and women), cert. denied, 453 U.S. 113, 101 S.Ct. 3148, 69 L.Ed.2d 997 (1981).