President Bush saluted the 50th anniversary of the Brown v. Board of Education desegregation ruling here Monday with a tribute to America as "a nation that strives to do right," while Sen. John F. Kerry (D-Mass.) hailed half a century of racial progress but said the nation continues to fail black and Hispanic citizens.

The two presidential rivals spoke at separate events commemorating the 1954 decision, in which a unanimous Supreme Court ruled that the doctrine of "separate but equal" education for blacks and whites was unconstitutional. The decision triggered massive resistance in the South but marked the beginning of a civil rights movement that led to anti-discrimination laws in public accommodations, voting rights, housing and employment.

Bush spoke at the grand opening for a historic site at the two-story brick Monroe Elementary School, one of the four segregated elementary schools that black children in Topeka were forced to attend in 1954.

"America has yet to reach the high calling of its own ideals, and yet we are a nation that strives to do right," Bush said in a sunny yard, with the doors of the 78-year-old school behind him. "We remember with gratitude the good souls who saw a great wrong, and stood their ground, and won their case."

Kerry, appearing six blocks away at the Kansas Capitol just over four hours earlier, said that defending the progress achieved since Brown is only part of the challenge of fulfilling the promise of the decision. The presumptive Democratic nominee said that minorities still suffer higher rates of poverty and joblessness than whites, and that too many school systems in America "are separate and unequal."

"Brown began to tear down the walls of inequality," he said. "The next great challenge is to put up a ladder of opportunity for all."

Neither Bush nor Kerry mentioned the day's huge development in another civil rights battle -- the issuance in Massachusetts of the first marriage licenses to gay couples. Bush later issued a statement reaffirming his support for a constitutional amendment barring gay marriage.

Monday's events marked the first time Bush and Kerry had traveled to the same place to talk about the same subject since the presidential campaign opened. Even though advisers to both candidates described the appearances as non-political, there was an undercurrent of politics throughout the day.

Neither candidate mentioned the other directly in his speech, although Kerry criticized the administration's policies. Kerry spoke at an event organized by Gov. Kathleen Sebelius (D) that was dominated by Democrats after several Republicans, including the president, turned down invitations to participate, according to her spokeswoman, Nicole Corcoran.

Kerry shared the stage with many national leaders of the civil rights movement, some of whom had been invited to attend the later event with the president but chose to appear with Kerry, said Wade Henderson, executive director of the Leadership Conference on Civil Rights.

The back-to-back speeches by the rival candidates gave a preview of face-offs to come. Bush remains intent on projecting optimism, despite polls showing that a majority of Americans believe the country is headed in the wrong direction, and Kerry is jumping into the role of challenger by highlighting conditions he would strive to fix.

Bush, who won less than 10 percent of the African American vote in 2000, received a friendly reception from the crowd at his event. He left the podium with a big wave and his arm around Cheryl Brown Henderson, president of the Brown Foundation and one of three daughters of the late Oliver Brown, whose lawsuit with 12 other families culminated in the historic ruling. She also spoke at the morning event at the Capitol.

Bush was 7 and Kerry was 10 when the ruling was handed down. Both said it changed America forever. "For the better," Bush added. From there, their emphases diverged.

Bush, who spoke for 12 minutes, noted that "the habits of racism in America" persist. "The habits of respect must be taught to every generation," he said. "Laws against racial discrimination must be vigorously enforced in education and housing and hiring and public accommodations."

Bush used the occasion to push for the policies that he considers part of building an "opportunity society."

"Many African Americans with no inheritance but their character need access to capital and the chance to own and build for the future," he said. "While our schools are no longer segregated by law, they are still not equal in opportunity and excellence. Justice requires more than a place in a school. Justice requires that every school teach every child in America."

Bush was unsparing in his description of the evil of segregation, saying it "codified cruelty, at the service of racism" and "dulled the conscience of people who knew better." But he heralded the progress that began with Brown, often called the most important legal case of the 20th century. "We honor those who expose our failures, correct our course and make us better people," he said.

Kerry hailed the 50-year-old decision but said much work remains to create equal opportunity for all races. Without naming Bush, Kerry charged that some are working to roll back racial progress.

"Today more than ever, we need to renew our commitment to one America," the senator said. "We should not delude ourselves into thinking for an instant that because Brown represents the law, we have achieved our goal, that the work of Brown is done, when there are those who still seek, in different ways, to see it undone -- to roll back affirmative action, to restrict equal rights, to undermine the promise of our Constitution."

Kerry won his loudest applause when he criticized the Bush administration's No Child Left Behind education program, which he voted for but contends has been mismanaged and underfunded. "You cannot promise no child left behind and then pursue policies that leave millions of children behind every single day," he said.

Kerry pointed to "nearly 4 million students in this nation going to schools that are literally crumbling around them," Hispanic fourth-graders who are one-third as likely to read at the same level as their white counterparts, and disappointing high school and college graduation rates for African Americans. Then he expanded his indictment beyond education.

"We have not met the promise of Brown when one-third of all African American children are living in poverty," Kerry said. "We have not met the promise of Brown when only 50 percent of African American men in New York City have a job. We have not met the promise of Brown when nearly 20 million black and Hispanic Americans don't have basic health insurance."

The Kerry campaign described his address as a non-campaign event, but aides distributed a background paper that was sharply critical of the president's civil rights record. The paper cited Bush's support for judges who "want to roll back civil rights in America" and accused Bush of opposing affirmative action and his Justice Department of weak enforcement of civil rights laws.

The Brown v. Board of Education National Historic Site, where Bush spoke, is run by the National Park Service. It includes a "Tunnel of Courage" with period footage of jeering crowds.

During an interlude in the warm-up speeches as the flag-waving crowd awaited Bush's arrival, Air Force One flew directly over the school as a youth choir sang "Let There Be Peace on Earth." The flyover, a reminder of the huge benefits of incumbency, was carried live on local television.

President Bush hugs Cheryl Brown Henderson at the Brown v. Board of Education National Historic Site in Topeka, Kan. Henderson's father brought one of the suits that led to school integration. Rep. Elijah Cummings (D-Md.) talks to his party's presidential candidate, Sen. John Kerry (Mass.), at a ceremony commemorating the 50th anniversary of the Brown v. Board of Education decision.