President Obama argued on Thursday government needed to provide, not only "the absence of oppression," but also "the presence of economic opportunity" as the nation sought to secure the gains of the civil rights movement.

In a sweeping half-hour speech at the Lyndon Johnson Presidential Library in Austin, Obama credited the former president as an exemplar of what lawmakers should do when granted power.

He said the president and former Senate majority leader never forgot his humble roots in poverty, and he credited that background with driving Johnson's push for the Civil Rights Act of 1964. Obama's speech marked the 50th anniversary of that milestone legislative accomplishment.

"As powerful as he became in that Oval Office, he understood them," Obama said. "He understood what it meant to be on the outside, and he believed that their plight was his plight too. … Making their lives better was what the hell the presidency is for."

Obama, the nation's first black president, spoke in deeply personal terms of how civil and voting rights protections — as well as government assistance programs — had paved the way for his own successes. And he blasted those critical of the role of the government in "broadening prosperity for all those who strived for it."

"I reject such cynicism, because I have lived out the promise of LBJ's efforts," Obama said.

The president also looked to explicitly link his own accomplishments and policy agenda to the titans of the civil rights era.

He noted that Johnson's Great Society program, including Medicare, had been criticized as socialist — an acknowledgment of claims about his own ObamaCare program. And he seemed to challenge complaints from Republican critics who have accused Obama of abusing his power or attempting to change the fabric of the country.

"You're reminded daily that in this great democracy, you are but a relay swimmer in the currents of history, bound by decisions made by those who came before, reliant on the efforts of those who will follow to fully vindicate your vision," Obama said. "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.

"The story of America is a story of progress," Obama added. "However slow, however incomplete, however harshly challenged."

Obama did not unveil any new policy proposals but argued more broadly for his vision of the role of government. 

"We are here today because we know we cannot be complacent, for history travels not only forwards, history can travel backwards," Obama said. "History can travel sideways. And securing the gains this country has made requires the vigilance of its citizens. Our rights, our freedoms — they are not given. They must be won. They must be nurtured through struggle and discipline and persistence and faith."

Still, by aligning himself so closely with Johnson's legacy, Obama does risk wilting by comparison. When Obama credited Johnson as having "grasped, like few others, the power of government to bring about change," it invited questions about his own legislative prowess. 

Obama has seen his legislative agenda marred in partisan gridlock, ever since Democrats lost control of the House in 2010. Despite a dominating reelection victory, the president has seen little progress with his efforts on immigration reform, universal pre-K, or infrastructure and jobs programs.

White House officials have defended Obama's record, arguing that Johnson enjoyed one of the largest Democratic congressional majorities in history, and had tools like earmarks and patronage at his disposal as he looked to whip votes. And, they say, party polarization has made reaching across-the-aisle compromises more difficult.

Obama has also come under fire from some upset with the lack of progress that some minority groups have seen during his presidency. Unemployment rates for minorities persistently outpace whites, while blacks and Hispanics are far more likely to be incarcerated.

On Thursday, press secretary Jay Carney said Obama spoke frequently about "the challenge posed by a lack of mobility economically."

He also argued Obama has seen "enormous progress" on other civil rights issues, including LGBT equality, while attacking Republican lawmakers for not supporting an equal pay bill that stalled in the Senate earlier this week.

"It is astounding, as we celebrate the 50th anniversary of the Civil Rights Act, that not a single Republican in the Senate thought it was worth their time or worth their support to vote for a bill that would simply give women more tools to ensure that they’re paid fairly," Carney said. "And the data is clear on why this is necessary, but for some reason, Republicans don’t seem to agree on this issue, which is a little shocking."

In the conclusion of his remarks, Obama seemed to acknowledge some of those limitations, but he argued the importance of incremental work toward equality.

"Ours, in the end, is a story of optimism, a story of achievement and constant striving that is unique upon this Earth," Obama said. "He knew because he had lived that story. … And in part because of him, we must believe it as well."