Twenty years ago, some 23 percent of students at Boston Latin School were black, giving hundreds of African-American teenagers access to the city's top public high school and a springboard to elite colleges.
Today, just 9 percent of Latin students are black, and only 12 percent are Hispanic, levels far lower than the city's other two exam schools — Boston Latin Academy and O'Bryant School of Mathematics and Science — and markedly out of step with the district as a whole.
The percentage of black students who attend Latin School has declined each year since 2010, state data show, reaching its lowest mark since at least the mid-1990s.
The disparity lends context to recent complaints of racism that have roiled the school, prompted a School Department investigation, and raised questions about the cause — and consequences — of low enrollment of students of color at the competitive exam school.
Some Latin School students and alumni say the decline has contributed to a climate where students of color are marginalized and racial epithets are thrown around all too casually.
In the 13 days since a student group launched a social media campaign to raise awareness of alleged racism at the school, some parents, alumni, and close observers of the school system have said the issues are longstanding and have even deterred some students from enrolling.
"I know of parents of color [whose children] will score high enough to get into Latin, but will choose Latin Academy because they are concerned about the culture, a feeling that their students won't be supported in the way that they need," said Kim Janey, senior project director at Massachusetts Advocates for Children, a Boston nonprofit.
Larger demographic trends have also played a role in reducing diversity at the school. The percentage of black students who attend Boston public schools has dropped from 48 percent in 1996 to 32 percent this year.
That citywide decline appears to be one cause of the long-term decline in black enrollment at Latin School, where seats are coveted due to high academic performance that makes it among the top feeder schools to Harvard and other prestigious colleges. Last year, every student at the school scored proficient or advanced on the English and math sections of the MCAS tests.
Another cause of shrinking black enrollment at the school is a 1995 lawsuit that led the Boston School Committee the following year to eliminate racial quotas that had, since the era of court-mandated school desegregation, reserved 35 percent of exam school seats for black and Hispanic students.
Since then, the number of black students at Latin School has dropped by 60 percent. Over the same period, the school's Hispanic population has grown by less than 1 percent, even as the percentage of Hispanic students across the district has increased by almost 70 percent.
The school is a magnet for white and Asian students, which is unusual in the Boston system. Nearly half of Latin School students are white, compared to 14 percent districtwide. The number of white students at the school has declined slightly over the past 20 years, but not nearly as quickly as their representation in the district as a whole.
Almost 30 percent of Latin School students are Asian, compared to 9 percent across the city. That portion has swelled from just 17 percent two decades ago, when the district had over 1,100 more Asian students.
Boston public school officials said in a statement Thursday that although a 1998 court order banned the district from considering race in exam-school admittance, it is working to "increase diversity and cultural proficiency at these schools and those across the district."
Under Superintendent Tommy Chang, the district is trying to close achievement gaps and increase the acceptance of black and Hispanic students into exam schools, in part by offering more preparation courses for the entrance exam, the statement said. Currently, only one is offered.
Scores on the exam, which students can take in the sixth and eighth grade, are combined with grade-point averages to determine admission into the three schools.
The present controversy surfaced last week, when two Latin School seniors — Meggie Noel and Kylie Webster-Cazeau — said in a YouTube video that black students are routinely subjected to racial slurs and insensitive remarks.
They accused administrators of failing to discipline students for racist behavior and called on classmates to share stories of racist experiences on social media, using the hashtag #BlackAtBls. The social media campaign has since expanded to high schools across the district.
In response, school officials said they would investigate the students' charges and provide mandatory training for school leaders on how to respond to reports of bias.
This week, Chang and Mayor Martin J. Walsh met separately with students to discuss their concerns and praised the students for sparking a discussion about diversity and inclusion.
"This struggle is not new to Boston," Chang said at Wednesday's School Committee meeting, where Noel and Webster-Cazeau spoke. "We are ready to listen and act on [the student advocates'] behalf."
Omékongo Dibinga, who teaches at American University in Washington, D.C., said in an interview that he experienced racism when he attended Latin School in the 1990s.
Dibinga said there were times he was disciplined more harshly than white students for the same offenses, and that when he ran for senior class president some white students wore white sheets in protest. They were not disciplined, he said.
Dibinga said he wasn't surprised such issues have persisted. Declining black enrollment, he said, may have made matters worse and discouraged parents from choosing the school.
"Black families are very sensitive about how their children are going to be perceived," Dibinga said. "If parents feel like nothing has changed, or maybe even gotten worse, why would they subject their child to that?"
Janey, of the children's advocacy group, said her sister was one of many black students of their generation who entered the Latin School in the 1980s but eventually transferred because they did not find a nurturing environment.
"There is, from the people I know personally, a feeling that there wasn't the support there needed to help navigate through," she said.
But Ernani DeAraujo, an attorney and former city official, said he saw high attrition among students of all backgrounds, and he did not remember feeling isolated or experiencing racism as one of few Latino students at the school in the 1990s. At the time, he said, Latin School warned incoming students to expect three hours of homework each night.
With more than 2,400 students, Latin School is the largest public school in Boston. And because of its high academic expectations, it is widely considered one of the most difficult.
But for many students, especially those of limited means, the exam school provides a route to top colleges and career paths that would have otherwise been closed, DeAraujo said.
"A year at Phillips Andover or at Choate costs more than my mom's annual income at that time," he said, naming two top private schools. "So to get that quality of education at a public school is just amazing. I wouldn't be where I am today without it."
Complaints of racism at Latin School are not new, said Rosann Tung, a Brown University researcher who has studied Boston's public schools. Tung said black and Hispanic students are substantially underrepresented at the prestigious school.
"It's a systemic opportunity gap," she said.