Tiara Coelho, the biracial daughter of working-class parents, and Brooke Macy, the daughter of white professionals, share a third-grade classroom here with African Americans, Hispanics and a sprinkling of Native Americans.

Their friendship is an unremarkable sight in this magnet school just down the road from the all-black elementary school that was closed as a result of the Supreme Court's landmark decision in Brown v. Board of Education. The two have a difficult time trying to imagine life in a segregated school system until a painful truth dawns on Brooke.

She grips Tiara's arm. "You and I wouldn't have gone to school together," she says. "We couldn't be friends."

This city of 120,000 people in the geographical heartland of America has come a long way in the 50 years since the nation's highest court struck down the "separate but equal" doctrine long used to justify a two-tiered system of education. Today, Topeka schools are among the most racially diverse in the country. At a time when U.S. schools are becoming increasingly segregated, a typical white student in Topeka attends classes that are 50 percent minority.

The decision has led to dramatic progress outside schools. Half a century ago, blacks were excluded from public swimming pools, golf courses and movie houses in Topeka, and all but the most run-down hotels and restaurants. Their employment opportunities consisted largely of work as janitors, window washers and maids.

Today, the mayor of Topeka is black, as is the school superintendent. "I am a direct beneficiary of Brown," said James A. McClinton, 42, who became mayor last year. The court ruling enabled him to "attend desegregated schools and get some of the best education Kansas has to offer."

But McClinton and others say the revolution wrought by Brown is fragile and incomplete. As whites leave the city for the suburbs, maintaining racial balance in Topeka schools is an increasingly complicated juggling act. Even more alarming, blacks and Hispanics continue to trail whites significantly in educational achievement.

When President Bush travels to Topeka for the 50th-anniversary celebrations of the May 17 ruling, he will visit a school district that no longer regards classroom desegregation as the priority it once was. Nowadays, Topeka school officials say, the number one goal is meeting the targets of No Child Left Behind, a federal law passed in 2002 that sets increasingly ambitious academic benchmarks for all groups of children.

"We are trying to maintain diversity, but it's becoming more and more difficult," said Brad Cox, the head of a four-person demographic unit charged with preventing Topeka schools from becoming "racially identifiable." "Diversity for diversity's sake is not what we are after anymore."

The Topeka success story was the result of decades of follow-up litigation to Brown, and of demographics. In 1954, blacks accounted for 7.5 percent of the population. Race relations in Kansas, a free state before the Civil War, were never as polarized as they were in parts of the Deep South, where blacks were a majority. Even today, three in four Topekans are white.

While there are still sufficient numbers of white students in the Topeka school system to foster diversity, the trend lines point in a troubling direction. The proportion of minority students in Topeka public schools has been increasing nearly 2 percent per year, from 30 percent in 1991 to more than 51 percent today. In some Topeka schools, nearly four-fifths of the students are nonwhite.

"If these trends continue, we could soon be back to where we don't want to be," said Russ Hutchins, principal of Ross Elementary School, which is 73 percent minority. The school district would then face the difficult choice of accepting the inevitability of resegregation, or considering more politically controversial alternatives, such as redrawing school district lines or additional busing.

These demographic trends are a relatively mild example of a pattern that has become well established across the rest of the country as the courts declare more and more school districts "unitary," or integrated. According to Harvard professor Gary Orfield, the past two decades have witnessed a gradual resegregation of U.S. schools, which are little more integrated today than they were in 1968, when the Rev. Martin Luther King Jr. was assassinated. In large urban districts, such as Washington, Chicago and Detroit, resegregation has been even more acute.

The Brown decision "broke the back of American apartheid and cleared the way for an end to legalized segregation in all walks of life [but] it didn't end racial discrimination," said Theodore M. Shaw, president of the NAACP Legal Defense and Educational Fund, which was founded by Thurgood Marshall, the lead litigator in the Brown case. "In some ways, we accomplished a great deal. In other ways, we did not accomplish anything at all."

'The Result of the Vision'

When Chief Justice Earl Warren read aloud the unanimous judgment of the Supreme Court at 12:52 p.m. on May 17, 1954, declaring that "separate educational facilities are inherently unequal," there was jubilation among the black lawyers who brought the case. Marshall predicted that school segregation would be stamped out within five years.

That was not the case. Hoping to avoid a white backlash, the justices decided in 1955 that desegregation would take place "with all deliberate speed," an ambiguous phrase that gave rise to a wide array of delaying tactics.

"My father was very disappointed," said lawyer Charles Scott Jr., the son of a civil rights attorney who represented the Rev. Oliver Brown and 12 other black plaintiffs in their bid to integrate Topeka schools. "Little was done to integrate the school system in the early years after the Supreme Court decision."

A part-time welder and African Methodist pastor, Brown wanted to enroll his daughter Linda in an all-white school four blocks from his home rather than in the all-black Monroe school 20 blocks away. But Monroe remained a predominantly black school until its closure in 1975.

By 1979, the 25th anniversary of the Brown case, Scott had had enough. He and other civil rights lawyers went to court to argue that the school district had failed to live up to the promise of Brown. It took 15 more years of legal wrangling before a U.S. district judge ordered the school system in 1994 to "remove the vestiges of segregation."

A court-backed remedial plan adopted in Topeka in 1996 led to the closure of eight racially identifiable schools and the opening of two large magnet schools, including a computer technology school named after the Scott family. By adopting a system of voluntary busing and redrawing school boundary lines, the school board committed itself to ensuring a diverse racial mix in all Topeka schools.

At the Williams magnet school -- where Brooke and Tiara attend classes -- children are bused in from all parts of Topeka, attracted by imaginative science programs unavailable elsewhere. Students spend part of their day in classroom equivalents of a rain forest, a desert and a horticultural center.

"I was very impressed by the diversity of the student population and the enthusiasm of the teachers," said Brooke's mother, Kathleen Ambrosio, who took her daughter out of private school to send her to Williams. "I didn't feel that she was getting any cultural diversity at her former school. Where we live is predominantly white."

Created as a direct response to the 1994 court order, the Williams school had a student body that was half white and half minority in 1999, when the judge lifted his order and declared the Topeka school system integrated. Five years later, the school is 35 percent white and 65 percent minority.

"What you see here represents the final chapter of Brown v. Board," horticulture teacher Karon McAtee said. "We are the result of the vision."

The magnet school concept, which has been tried in other school districts nationwide, has some drawbacks, Topeka school superintendent W.L. "Tony" Sawyer acknowledges. It is more difficult to foster a sense of community and parental involvement in a magnet school than in a neighborhood school. Magnet schools also tend to drain resources from the rest of the school system because of their special programs and transportation needs.

Different Levels of Success

Built in 1931, at a then-staggering cost of $1.75 million, Topeka High School, complete with stained-glass windows and a soaring bell tower, is one of the city's landmarks. Its marble-lined corridors and stairwells are a testament to Topeka's diverse population. Whites, blacks, Hispanics and Asians mingle easily in the halls, listening to the same music with headphones and wearing the same kinds of jeans and T-shirts.

"This is a school where it doesn't matter what color you are," said senior Lorrence Thompson, a black member of the student council. "I have friends of all races."

But beyond the impression of a multi-ethnic kaleidoscope, administrators say, is the reality of a school that is producing very different levels of academic success. On last year's 10th-grade math test, nearly 60 percent of black students and 40 percent of Hispanics were rated "unsatisfactory." Only 30 percent of white 10th-graders scored at that level. There were similar achievement gaps in reading and science.

It is a pattern seen in schools across the United States.

"We seem integrated, but the statistics show a different picture," said Teresa Le Canty, a student academic coordinator. "Hispanics and African Americans are achieving at a much lower rate than whites. They all go to school together, but the learning is not the same."

Much of the achievement gap can be explained by differences in socioeconomic status: White students at Topeka High tend to come from more affluent backgrounds than their minority counterparts. But some black teachers also bemoan the breakdown of the close-knit community that was part of the segregated school experience.

"We have achieved integration, but in the process we have lost a sense of community and social support," said Topeka High Principal Clardy Vinson, who is black. "In the old days, black students had a built-in support system. They were in constant contact with people they could identify with -- teachers, parents, pastors -- who were working together to help them succeed. The achievement gap is the result of this support system not being in place."

Others say that vestiges of segregation can be felt at Topeka High. "It's like a ghost whispering in your ear," school social worker Lesia Carter said. She points to the school cheerleading squad, which is predominantly white. The flag team, by contrast, is overwhelmingly black.

Fifty years after Brown, Topeka blacks are divided over the way forward. Scott, the lawyer who won the 1994 judgment against the school board, regrets that the courts are abandoning their traditional oversight role.

"Segregation is just as evil and hurtful now as it was in 1954," he said. "The courts should be involved."

But there is little enthusiasm for further court-ordered desegregation in Topeka's black establishment. The mayor and the school superintendent say they prefer to focus on improving existing schools rather than on demographic engineering. The overriding priority these days is meeting the targets of No Child Left Behind.

"My goal is to make our neighborhood schools as good as they can be," said Sawyer, the superintendent. "Otherwise, people will vote with their feet."

Tiara Coelho, left, 10, and Brooke Macy, 9, attend a diverse magnet school in Topeka, Kan.Topeka High School students, from left, Darrell Thomas, Andrew Cox and Dorian Branch, all 15, look to the chalkboard during a math class.Students at the Williams magnet school are bused in from all parts of Topeka. They are drawn to the school by science and fine arts classes that are not offered elsewhere.