Barack Obama has asserted his power of executive privilege for the first time in his presidency. But before taking up residence in the White House, Obama, along with his fellow Democrats, was a vocal critic of George W Bush's use of the same tool.

In March 2007, Obama – then an Illinois senator – appeared on CNN's Larry King Show. "You know," he said, "There's been a tendency on the part of this administration to try to hide behind executive privilege every time there's something a little shaky that's taking place … I think the American people deserve to know what was going on there."

Obama was criticizing Bush's repeated use of executive privilege to prevent senior White House executives from testifying before Congress on the firing of senior federal attorneys. Democrats alleged the firings took place on political grounds.

Executive privilege is the right of the president and high-level executive branch officers to withhold information from other public institutions who have compulsory power: Congress and the courts. The rationale behind it is that presidents and their staff should be able to candidly offer their thoughts.

But the privilege comes with qualifications, and its use has rarely been without controversy as in 2007, when Bush resorted to it.

Obama had then told King, "There doesn't seem to be any national security issues involved with the US attorney question. There doesn't seem to be any justification for not offering up some clear, plausible rationale for why these US attorneys were targeted when, by all assessments, they were doing an outstanding job."

Obama was not the only Democratic politician who said Bush was abusing his privilege.

"Increasingly, the president and vice-president feel they are above the law. In America no one is above law," then Democratic Senator Patrick Leahy had said months before Obama spoke.

Leahy was chairman of the congressional judiciary committee that was repeatedly stonewalled by Bush's use of executive privilege. He added: "This White House cannot have it both ways. They cannot stonewall congressional investigations by refusing to provide documents and witnesses, while claiming nothing improper occurred."

House speaker and Democratic representative from California Nancy Pelosi, speaking in a debate on 14 February 2008 was even more scathing, saying: "This is beyond arrogance. This is hubris taken to the ultimate degree."

Unfazed by the attacks, Bush continued to use his privilege power. On 21 June 2008, the White House cited it while refusing to turn over documents to a congressional committee investigating the Environmental Protection Agency's decision to deny California permission to implement its own vehicle emission standards.

The Bush administration asserted executive privilege hours before the House Oversight and Government Reform Committee was to vote on whether two senior EPA and White House executives, who had refused to hand over subpoenaed documents to the committee, should face contempt-of-Congress proceedings.

Bush's earliest use of the executive privilege came in his very first year of presidency. On 13 December 2001, he prevented a congressional committee from accessing documents relating to a longstanding scandal involving the FBI's alleged misuse of mob informants in Boston. His order also denied the committee access to internal justice department deliberations about President Bill Clinton's fundraising tactics, in the process sparking criticism from fellow Republicans.

By contrast, Obama's use of the executive privilege tool has come four years into his presidency – an argument Democratic politicians who once severely criticised Bush, will undoubtedly offer as defense for Wednesday's controversial action.