On Tuesday, students in one of the most diverse school systems in the country, backpacks and pencils at the ready, will climb aboard yellow buses or drive or walk a few blocks to Alexandria's public schools for the first day of classes.

The students will come from nearly 90 different countries and speak nearly 70 languages at home. They will come from million-dollar houses, bungalows, townhouses, apartments and cramped public housing. They all will share classrooms, lunchrooms and hallways -- and an education.

These days, the city's high school, T.C. Williams, is held up as a model for diversity, celebrated not only for the feel-good integration movie "Remember the Titans" but for the graduates who go on to some of the top colleges and universities in the nation.

"I hear from kids once they've graduated. They say they miss the diversity. They miss the black and brown faces," said Pat Welsh, a longtime English teacher at T.C. Williams. "You can't buy that kind of education, the kind of comfort that they have around different kids, kids who are thought of as the 'other' that kids from private schools don't have."

Yet there was a time, not so long ago, when few could have imagined this future. This school year marks the 40th anniversary of the desegregation of the Alexandria public school system.

Ironically, the school now so synonymous with diversity, T.C. Williams, is named for the long-serving school superintendent who, in the 1950s and early 1960s, supported Virginia's "massive resistance" to integration and fired a black cafeteria worker who wanted her children to attend white schools.

"He was reluctant to integrate," said Mark Howard, a retired Alexandria school administrator who has written a history of the system's desegregation. "And he wasn't alone."

Such blatant discrimination is no longer the rule. But vestiges of separation remain, just as they do in virtually every diverse school in the United States. In Alexandria, the promise of integration and equal opportunity is a work in progress.

Look at the practice fields at T.C. Williams as the football team gathers for its preseason workouts. The players are mostly black. Look at the crew team. The rowers practicing strokes on the Potomac River are mostly white. Walk down the halls in many Alexandria schools, and the kids in the gifted, honors and Advanced Placement classes are mostly white. Students in remedial classes tend to be black and Hispanic.

Drive past some of the city's 13 elementary schools. Even after decades of often disruptive attempts to achieve better racial balance -- redrawing school boundaries, busing, creating magnet and focus schools and "pairing" schools in largely black neighborhoods with schools in white neighborhoods -- some city schools remain stubbornly out of balance racially.

For instance, the most recent demographics show that at Jefferson-Houston for Arts and Academics and Maury Elementary School, more than three-fourths of the students last year were black -- far more than the systemwide average of 43 percent. At George Mason and Charles Barrett elementary schools, however, slightly more than half the students were white -- more than double the 23 percent average systemwide.

In recent weeks, T.C. Williams teachers met to discuss one of the most troubling and stubborn statistics: black students, as a group, continue to score lower on standardized tests than virtually any other racial or ethnic group, a decades-long phenomenon called the achievement gap.

"Are our schools as racially integrated as I would like to see? No they are not," said Sally Ann Baynard, a School Board member. "Are they as racially balanced as they could be legally right now? I think so."

Mabel Lyles came to teach in Alexandria public schools in fall 1954. In May 1954, the U.S. Supreme Court had handed down its landmark Brown v. Board of Education decision declaring that "separate but equal" black and white school systems were unconstitutional.

Josiah S. Everly, then Alexandria's School Board chairman, said of that time, "We were shaking a little bit and were uncertain as to what to do and how to do it."

Lyles started teaching at Lyles-Crouch Traditional Academy, one of the city's two all-black elementary schools. Soon, a memo came down from the central office: Despite the Supreme Court ruling, nothing was going to change in Alexandria.

She kept teaching.

In 1956, U.S. Sen. Harry F. Byrd and Rep. Howard W. Smith, both of Virginia, introduced the "Southern Manifesto" condemning the Supreme Court decision. The state began a campaign of "massive resistance" to desegregation. Public schools began to close rather than integrate. When Arlington School Board members voted to desegregate their schools that year, furious state legislators passed a law revoking the county's right to an elected board and mandated that members be appointed by the County Board thereafter. Schools stayed segregated.

By 1958, 12,000 children in Norfolk, Charlottesville and Front Royal had no schools to go to.

Lyles kept teaching.

In 1958, the 900-member Alexandria PTA voted in favor of cities developing their own integration plans -- to no avail.

In 1958, 14 black students in Alexandria applied to attend white schools. At the time, a state pupil placement board evaluated all black students applying for transfers to white schools on six criteria, one of them being "mental and emotional stability." All 14 were denied.

The next year, the students sued and won. Then, Virginia's "massive resistance" program was struck down by a federal court in Norfolk and the Virginia Court of Appeals.

That fall, nine of the 14 students began attending three Alexandria public schools. There was little of the fanfare that had greeted four 12-year-olds in Arlington, who had to walk past 90 police officers wearing riot gear on their first day of school one week earlier. Both times, local papers ran variations of the same headline: "The day nothing happened."

And still, Lyles kept teaching. But in that year, school psychologists came to her fifth-grade class and gave her students batteries of tests, she recalled.

"They said it was to get ready for integration," she said. "And they were afraid we'd help them too much if we gave the tests."

If she wanted to take her family swimming, they went to the Johnson pool, the pool for blacks. The Cameron Street pool was for whites. When she went to systemwide faculty meetings, all the black teachers sat on one side of the auditorium, the white teachers on the other.

None of those things struck her as odd.

"I was born in Virginia, so that had always been a part of my life," Lyles said. "I guess at that time, I was just a young teacher following the law."

Then, in May 1963, the Alexandria City Council voted to desegregate all public facilities.

John C. Albohm, then the school superintendent, went to a football game at the all-white high school that fall. He noticed lights on another field, about a quarter-mile away. He learned that was the football game at the black high school, Parker-Gray.

"You mean they're only there because they're black," Albohm remembered later. "I said I'm going to put those lights out. And I did."

That year, Albohm integrated all after-school and evening programs in auditoriums, plus the teachers' association and summer school. Some School Board members wanted to integrate the schools one grade at a time, starting in kindergarten. But almost a decade had passed since the Brown v. Board of Education decision, and Albohm didn't want to wait any longer.

In 1964, the Alexandria School Board was enlarged from six to nine members, and the first black member, Ferdinand T. Day, was appointed. Workshops and tutoring programs began to prepare students, teachers and parents for integration.

Then, in fall 1965, every student, regardless of race, was assigned to their nearest neighborhood schools. The school system was officially desegregated, the first in the commonwealth to do so completely.

That year, the school system also stopped paying "freedom of choice" tuition grants. Between 1960 and 1965, the system had granted 1,000 scholarships to white students to attend private and parochial schools as far away as Massachusetts, Indiana, New Hampshire and Ohio. One critic said the grants were a "transparent evasion" of the desegregation law.

Lyles remembers that first fall when both white and black faces looked up at her in front of the classroom. She remembers a white mother who made sure there were always enough treats for every child during class parties. But she also remembers two little boys, one white and one black, who kept scuffling.

"I told them they were going to be working together in the world, so they needed to learn to get along in school," said Lyles, who has written about her experiences in a book, "Caught Between Two Worlds." Coming from such separate worlds, the boys didn't understand what she meant. One just smiled, she remembered, and said, "Well, maybe."

Throwing two such isolated worlds together created aftershocks. The system where children went to their neighborhood schools still left some of the city's schools segregated. Because of that, in the early 1970s, the school system was under threat of sanction and a forced integration plan by what was then known as the federal Housing, Education and Welfare Department. So in 1971, the School Board consolidated its three high schools into one, T.C. Williams, and two years later began busing children to schools outside their neighborhoods.

Lillian Patterson, a curator at the Alexandria Black History Museum, is a fourth-generation Alexandrian. She remembers with bitterness attending segregated schools and getting only the textbooks and musical and athletic equipment that the white schools no longer used.

Her daughter was in second grade when the schools were integrated in 1965. She remembers a white teacher not wanting an A grade to stand because it had come from a black teacher.

"Like if a black teacher gives you an A, it ain't really an A," Patterson said dryly.

She remembers how PTAs suddenly formed all-white "executive councils" and kept all the power. Teachers, who had been easily accessible in all-white schools, became available only for 15-minute conferences twice a year. "One day, my daughter came home from school and said, 'For black kids, all you have to do is sit in class and be quiet and you'll pass,' " Patterson recalled. "Act like you're not going to start a revolution, and you'll be fine."

Alexandria Commonwealth's Attorney Randy Sengel was a senior at the newly opened and newly integrated T.C. Williams in fall 1965. His father had marched in civil rights protests, and his family had been eager for the schools to integrate, he said. What he remembers most is that the music of the time -- the Temptations, the Rolling Stones, the Supremes -- is what brought people together.

"I think a lot of us looked at it as, 'Hey look, this ought to be going on and this is the right thing to do,' " Sengel said. "But we were just kids. I think we were most excited about going to this new school."

Mark Howard, the retired Alexandria school administrator, grew up going to segregated white schools in the District. In 1967, he became assistant principal at what was then George Washington High School, which then had a majority of Alexandria's black students. It was a touchy time.

The administration was not integrated, which caused bitterness. Tracking became more pronounced, with white parents demanding that their children be put in gifted classes. And he remembers a small number of black students who resented losing their school -- Parker-Gray High was closed in 1965 -- and making trouble. Some teachers wanted the students suspended or punished and resented it when board members discouraged it, fearing the black community would accuse the school of unfairly targeting its children.

"We've made wonderful strides, and we're in a position today where our schools are more reflective of our society, more equitable," Howard said. "But it was tough back then. It was very tough. If you ask me if I'd do it again, I'd say no."

In Alexandria, there is an urban legend that says that once the schools were integrated, the white middle class abandoned them. Look at the statistics, people say. Alexandria is 60 percent white, yet its schools are only slightly more than 20 percent white.But statistics can lie.

Alexandria is indeed 60 percent white -- and, according to recent U.S. Census figures, becoming whiter. But the majority of city residents either live in single-person households or don't have school-age children. Fewer than 20 percent of the households are families with school-age children.

The Census Bureau estimates that there are 13,598 children ages 5 to 18 in Alexandria. Compare that with the total school enrollment -- about 11,000 -- and it's clear that by far, the vast majority of children in Alexandria, of any race or ethnic group, attend its public schools.

Indeed, there are parents who have chosen to send their children to one of the city's 13 private or parochial schools, or to nearby Fairfax County or the District for private school. And, according to census data, most of those children are white.

Running such a diverse public system is a delicate balancing act.

When asked about her educational philosophy when she first came to the system, Superintendent Rebecca L. Perry was blunt: "It is the worst crime to treat all children equally."

That's because when children come from such different places, the only way to make sure that they all meet high standards is to give each child exactly what the child needs, she said. For some, that means being challenged more. For others, that means extra help. And often both approaches need to be used in the very same classroom, by the very same teacher and at the same time.

"For so long, we said everyone has an opportunity for an education. But that's not enough," Perry said. "It's our responsibility to ensure that children learn. Not just that we're teaching them, but that they learn, regardless of their circumstance."

It's a tall order, and the system continues to struggle to get it right, said the School Board's Baynard.

Now, there are two-week kindergarten prep programs to help children who might not have had the benefit of preschool to get them off to a good start. There are calls for universal preschool. Now, any student, of any background, can take Advanced Placement classes at T.C. Williams, and get extra help if they need it to succeed in the courses.

Today, Baynard said, there is a far greater understanding that poverty, more than any other factor, is what defines the achievement gap. And there is an understanding, she said, that "the soft racism of low expectations" is just as damaging as overt discrimination.

That's one reason that, for all the complaints about standardized testing and the No Child Left Behind Act, Baynard applauds the measures. Now, those in power can no longer afford not to look for solutions, for everyone, of every group, at every school.

"I think just about everyone shares the goal that we want to be a world-class school system," Baynard said. "We're a rich city, but we've got some children of desperate poverty. We've got black and white and Hispanic. If we can't find out how to run a school system that's attractive for those who have choices and is wonderful for those who have no choices, who can?"

The school now so synonymous with diversity is named for an Alexandria superintendent, T.C. Williams, who supported segregation.Mabel Lyles, who taught at Lyles-Crouch Traditional Academy, sits by a display at the Black History Resource Center. T.C. Williams High School graduates celebrate their achievement in June.