Last year, the school system in one of the nation’s wealthiest communities welcomed students to an airy, majestic building on a 119-acre campus in Northern Virginia.

Expectations were high. The school, which cost $125 million to build and sits at the end of a winding driveway, would house some of Loudoun County’s most competitive academic programs. Maybe, some in the community figured, it would even rival Thomas Jefferson High School for Science and Technology — an ultracompetitive magnet school in neighboring Fairfax County.

The Academies of Loudoun has yet to garner the same cachet in suburban Washington circles as Thomas Jefferson. But the school is already facing criticism over its admissions policies, mirroring complaints that have dogged Thomas Jefferson and other selective high schools across the country.

The criticism reached a crescendo this month when the Loudoun NAACP revealed that the Virginia attorney general is reviewing accusations that African American students are denied equal opportunity to participate in the Academies of Loudoun. That investigation is also looking into allegations regarding other instances of discrimination in the 84,000-student school district.

But patterns of bias emerge long before high school, the civil rights organization says, with black students blocked from the pathway leading to a seat at the high-caliber academy that is devoted to science, technology, engineering and math.

Black students, the rights organization said, are less likely in elementary school to be identified and recommended for accelerated classes and gifted programs that propel students toward more challenging coursework in their later years.

Students wanting to attend the Academy of Engineering — one of three programs at the Loudoun school — must, at minimum, take geometry in eighth grade. For Academy of Science aspirants, Algebra 1 is a minimum requirement.

“African American students continue to be underrepresented in gifted and talented programs and are less likely to be identified as ‘high achieving’ [and] therefore, rarely enter The Academies of Loudoun admissions pipeline,” Michelle Thomas, president of the Loudoun County branch of the NAACP, said in a July letter to Loudoun Schools Superintendent Eric Williams.

School system officials acknowledge that students of color are underrepresented in the Academies of Loudoun. Students in the academies split time at a base high school and one of three programs — the Academy of Science, the Academy of Engineering and Technology and the Monroe Advanced Technical Academy, which offers vocational training.

Ashley Ellis, the assistant superintendent for instruction for Loudoun County Public Schools, said the district has increased efforts to attract applicants from more diverse backgrounds to the high school. The school system has also started contacting middle school students who are eligible to apply to the academies in hopes of reaching students who may not know they qualify or who might not think to apply, Ellis said.

The district hired an outreach specialist, provides recruitment materials in multiple languages and contacted professional organizations for black and Hispanic engineers to develop recruitment strategies.

The school system has programs in elementary and middle school that are designed to provide higher-level learning opportunities for students who belong to underrepresented groups, Ellis said.

“Admissions has not yet met our expectations in terms of diversity of students,” Ellis said. “The diversity should reflect the diversity of the whole county.”

Loudoun is far from the only community grappling with how to address disparities in education and broaden access to challenging curriculum. An effort by New York Mayor Bill de Blasio (D) to overhaul the admissions process for elite, specialized high schools, which admit few black or Hispanic students, was met with fierce backlash and has not proceeded so far.

In Fairfax County, another high-performing Northern Virginia school system, Thomas Jefferson High has long been scrutinized for not having enough black and Hispanic students.

In 2012, advocates filed a complaint with the U.S. Education Department alleging that black and Latino students and those with disabilities were shut out of Thomas Jefferson High because Fairfax County Public Schools failed to identify them for gifted-education programs that begin in elementary school.

At the time, black and Latino students accounted for about 4 percent of the 480 students admitted to the incoming freshman class. The two groups made up 32 percent of the county’s population.

Seven years later, those numbers have not improved. In May, Fairfax schools released admissions statistics for the class that would graduate from Thomas Jefferson in 2023. Nearly 73 percent of students who were admitted were Asian.

In a class of 494 students, 12 Hispanic students were admitted. The school system did not include the number of black students who were accepted because the figure was “too small for reporting.”

In Loudoun, only seven black students are enrolled among the 650 teens in the elite Academy of Engineering and Technology. In the Academy of Science, six of the 365 students in the program are black.

“The goal and the outcome is to make sure that racism, systemic racism ends now,” Thomas said at a town hall meeting attended this month by school system officials. “We need to make sure our children can have an environment where they can thrive.”

Of the 322 students admitted to the Academy of Engineering and Technology class that started this fall, three students were black, eight were Hispanic and five were mixed-race. By comparison, 232 students were Asian and 74 were white, according to school system data.

Among the first-year class for the Academy of Science, 192 students who were admitted were Asian, 27 were white, seven were Hispanic and three were black.

Across the school system, white students make up 46 percent of students, 23 percent are Asian, 18 percent are Hispanic, 7 percent are black and 6 percent are mixed-race, state data show.

Far fewer black and Hispanic students applied to the Academies of Loudoun compared with white and Asian students. For the class that began in the Academy of Engineering and Technology this fall, 677 applicants were Asian, 271 were white, 43 were Hispanic and 30 were black, according to data provided by the NAACP.

Students can apply for the Academy of Engineering and Technology and the Academy of Science the fall before they start high school. The process has two phases: In the first, students take a critical-thinking test and an assessment that gauges their skills in STEM — science, technology, engineering and math.

Finalists from the first phase move on to a second phase that involves taking another critical-thinking test, and an admissions team made up mostly of teachers reviews students’ letters of recommendation, writing assessments and academic records.

The admissions panel does not have applicants’ demographic information, such as gender, race or socioeconomic status, according to the school system’s website.

In her July letter to the superintendent of Loudoun County Public Schools, Thomas said failing to provide that information to the admissions panel is problematic because it makes it “impossible to assess an applicant’s unique experiences alongside traditional measures of academic achievement such as grades and test scores.”

The Loudoun NAACP filed a complaint regarding the Academies of Loudoun this year, prompting Virginia Attorney General Mark R. Herring (D) in October to launch the discrimination investigation.

Herring’s office asked the school system to furnish information related to its methods for recruiting students to the Academies of Loudoun, the programs’ admissions data and its admissions criteria.