AUSTIN, Texas (AP) — A half-century after the passage of sweeping civil rights legislation, President Barack Obama declared that he had "lived out the promise" envisioned by Lyndon B. Johnson, the president who championed the push for greater racial equality.

Marking the 50th anniversary of the Civil Rights Act, which Johnson signed into law, Obama lauded his Democratic predecessor's ability to grasp like few others the power of government to bring about change and swing open the doors of opportunity for millions of Americans.

"They swung open for you and they swung open for me," he said. "That's why I'm standing here today.

Obama spoke at the end of a three-day summit commemorating the landmark law that ended racial discrimination in public places. The anniversary has spurred a renaissance of sorts for Johnson's domestic agenda, which included the creation of Medicare, Medicaid and the Voting Rights Act. And against the backdrop of Obama's own troubled relationship with Congress, there have also been fresh bouts of nostalgia for Johnson's mastery of congressional deal-making.

"No one knew politics and no one loved legislating more than President Johnson," Obama said. "He was charming when he needed to be, ruthless when required."

The president also offered rare personal insights into his views on the office he has held for more than five years, casting it as a humbling perch with powerful possibilities.

"Those of us who've had the singular privilege to hold the office of the presidency know well that progress in this country can be hard and it can be slow, frustrating. And sometimes you're stymied," he said.

"You're reminded daily that in this great democracy, you are but a relay swimmer in the currents of history, bound by decisions of those who came before, reliant on the efforts of those who will follow to fully vindicate your vision," he continued. "But the presidency also affords a unique opportunity to bend those currents by shaping our laws and by shaping our debates, by working within the confines of the world as it is, but also by reimagining the world as it should be."

Story continues

As the nation's first black president, Obama faced criticism from some African-Americans in his first term for doing too little to help minorities. He's used his second term to focus more acutely on issues of inequality and economic opportunity, an effort that dovetailed with the commemoration of the Civil Rights Act.

Using Johnson's domestic successes as a model, Obama made the case that the government can still play a role in enacting social programs that can address inequalities.

"If some of this sounds familiar, it's because today we remain locked in the same great debate about equality and opportunity and the role of government," Obama said, noting that there were those who dismissed LBJ's "Great Society" as a failed experiment that encroached on liberty.

Amid the celebrations, Obama said he sometimes worries that decades after the civil rights struggles it becomes easy to forget the sacrifices and uncertainties that defined the era.

"All the pain and difficulty and struggle and doubt, all that's rubbed away," Obama said. "And we look at ourselves and say, 'Oh, things are just too different now, we couldn't possibly do now what they did then, these giants.' And yet they were men and women, too. It wasn't easy then."

Obama and first lady Michelle Obama arrived in Austin Thursday morning. Ahead of the president's remarks, the Obamas toured the LBJ library's "Cornerstones of Civil Rights" exhibit, which includes the Civil Rights Act signed by Johnson, as well as a copy of the Emancipation Proclamation signed by Abraham Lincoln and one of Lincoln's trademark stovepipe hats.

The Obamas also met privately with members of Johnson's family.

The president was introduced at Thursday's event by Rep. John Lewis, D-Ga., who withstood violence and arrest during the civil rights marches through Alabama in the mid-1960s. Lewis said Obama's election marked a moment when the nation believed it "may have finally realized the vision President Johnson had for all of us — to live the idea of freedom and eliminate the injustice from our beloved country."

The summit marking the 50th anniversary of the Civil Rights Act kicked off Tuesday with remarks from former President Jimmy Carter, who lamented residual racial inequality and Americans' apathy about the problem. Former President Bill Clinton followed on Wednesday, riffing on immigration and voting rights while warning that a modern-day reluctance to work together threatened to "put us back in the dustbin of old history."

Former President George W. Bush closed the event by calling education the key to the future for poor and minority students, and delivered a warning that he fears the "soft bigotry of low expectations is returning."

In 2002 Bush signed the No Child Left Behind law, which expanded the federal government's role in demanding accountability from schools. Bush has called the law a domestic policy success of his administration and criticized efforts to weaken the law.

Bush said the law helped close the achievement gaps between white and minority students.

"Any education gains that we make will be undermined by lowering our sights in the classroom. ... It is poor and minority children who suffer the most," Bush said.

"There is a needed federal role. It is not to dictate methods, but to help educate poor and minority children," Bush said, his voice rising. "It is only right to blow the whistle on mediocrity."

___

AP White House Correspondent Julie Pace in Washington and AP writer Jim Vertuno in Austin contributed to this report.

___

Follow Josh Lederman at http://twitter.com/joshledermanAP