He may have been the first African-American president of the Harvard Law Review and taught constitutional law at the University of Chicago. He may have written a book extolling constitutional values in a democracy.
And he may have run for president on a civil liberties banner, pledging to reverse the legacy of George W. Bush.
But as US president for the last 4-1/2 years, Barack Obama has faced accusation after accusation of impinging on civil liberties, disappointing his liberal Democratic base and providing fodder for rival Republicans as he deals with the realities of office.
News in the past week of the federal seizure of phone records from the Associated Press news agency and the Internal Revenue Service's targeting of conservative Tea Party groups, has intensified criticism already simmering over the Guantanamo Bay prison camp and aerial drone strikes abroad.
Asked at a news conference on Tuesday why the administration had not done more for civil liberties, Attorney General Eric Holder said: "I'm proud of what we have done" and emphasized the administration's shift from Bush era harsh interrogation practices of terrorism suspects that had drawn international criticism.
When he took office in 2009, Obama promised to close the Guantanamo camp for foreign terrorism suspects, but it remains open with 166 detainees, many on hunger strikes in protest at indefinite detentions. Obama said last month he would revisit that pledge and blamed Congress for blocking his plan to close the camp, partly through restrictions on transfers of detainees.
The administration has defended its aerial drone strikes abroad, which have included targeting a US-born terrorism suspect, as essential to the fight against al Qaeda and other militants in places such as Pakistan and Yemen.
On Tuesday, Holder defended the seizure of journalists' records, saying it was part of an investigation into a leak that he called "very, very serious." A law enforcement official said the probe is related to information in a May 2012 AP story on a foiled Yemen-based al Qaeda plot.
The phone records seizure was the latest in a series of crackdowns on leaks by the Obama administration.
Obama has disappointed some because of his background, and because he followed the Bush presidency that had responded to the attacks of Sept. 11, 2001, with what liberal critics saw as a trampling of civil liberties.
"There were reasons to think he would be different," said New York University law professor Barry Friedman, who teaches constitutional law and has written about public attitudes on the law. "He seemed to be inculcated with constitutional values, because of his background and because of what he said during the campaign."
Friedman and other law professors acknowledge the Constitution is a text open to myriad interpretations and that, in situations such as the use of drones, a constant balancing of national security and individual liberties occurs.
Obama is also contending with a polarized political scene and clashes with Republicans.
Harvard University law professor Laurence Tribe, a professor, mentor and longtime supporter of Obama, said his famous former student was facing the realities of being president.
Tribe wrote in an e-mail to Reuters that on campus, "Barack Obama could live in a world unclouded by bureaucratic and political obstacles. As President, however, Barack Obama needs to impose his basic beliefs and priorities on the vast bureaucracy. ... His failings, in my view, have much more to do with whatever he has permitted to take place under the supposed oversight of [individual Cabinet secretaries] than they have to do with his own constitutional understanding and commitments."
When Obama won his place as the first African American in the White House, many Americans applauded another advance in the country's long civil rights movement.
But while Obama has long presented himself as a progressive Democrat, he has not been known as a fiery civil libertarian.
His wont has been to assert the need for dialogue and consensus-building. In his 2006 book, "The Audacity of Hope," he wrote: "The scope of presidential power during wartime. The ethics surrounding end-of-life decisions. These weren't easy issues; as much as I disagreed with Republican policies, I believed they were worthy of serious debate. No, what troubled me was the process — or lack of process — by which the White House and its congressional allies disposed of opposing views."
Obama's administration has sometimes come under fire for its efforts to control the message, leading to allegations of manipulation.
In the case of the IRS and Tea Party groups, Iowa Republican Senator Charles Grassley wrote to Steven Miller, acting IRS commissioner, on Tuesday asking for all records relating to the decision to reveal its mistakes at a meeting on Friday of an American Bar Association committee instead of to Congress.
Some analysts say that because of his background Obama has been held to higher expectations.
"He was elected by a constituency that would expect him to be more sensitive to civil liberties," said author Larry Sabato, director of the University of Virginia Center for Politics.
Others say he is simply being judged by the standard all presidents should meet.
"I am certainly distressed by the latest revelations," Steven Shapiro, legal director of the American Civil Liberties Union, said on Tuesday. "I also think, honestly, that the fact that he was a constitutional law professor is much less significant than that he is now president. Every president has a duty to understand, appreciate and protect our civil liberties."
Asked about Obama's record on civil liberties compared to other presidents, Shapiro said the ACLU did not do comparative rankings of administrations and that, in any event, it would be too early to assess Obama. Critics and other observers agreed.
"We're living it right now," said Ilya Shapiro, a senior fellow of constitutional studies at the libertarian Cato Institute. Even as he asserts the administration may have "overreached" its constitutional authority, he said it was hard to predict how Obama's tenure will rank with past administrations.
"You never really know what's going on behind the scenes until they leave office," Sabato said, adding that Presidents John F. Kennedy and Lyndon B. Johnson abused the IRS, for example, by ordering audits of political enemies.
Sabato, who referred to other scandals including Watergate during Richard Nixon's administration and the Iran-contra controversy during Ronald Reagan's years, said: "Compared to prior presidents, we're still in the minor-abuse league."