When it comes to dealing with fights between the president and Congress, intervention by the courts has usually been a last resort.

That might explain why the current dispute over refusal by the White House to comply with subpoenas from the House majority over impeachment could prove problematic and prolonged -- for both sides.

What the third branch of government does-- or does not don-- could set important precedent.

Executive privilege has been around since the earliest days of the country, and gives the executive branch the ability to withhold certain internal discussions and documents from scrutiny.

It allows the president some breathing room for his own deliberations with staff. That discretionary power has a long history, but it often plays out very differently, depending on circumstance and timing.

And it has been a source of controversy in every recent administration.

President Barack Obama in 2012 asserted executive privilege ahead of a hearing before a House committee, which subsequently recommended his attorney general be cited for contempt of Congress.

At stake were Justice Department documents relating to the flawed Fast and Furious gunrunning sting the House Oversight Committee sought, but that then-Attorney General Eric Holder said were confidential.

Before that, the partisan roles were reversed.

In 2007, President George W. Bush insisted that White House Counsel Harriet Miers and White House Chief of Staff Joshua Bolten would not testify under oath or provide subpoenaed information about the firings of nine U.S. attorneys, a controversy that had led to the resignation of Attorney General Alberto Gonzales the year before.

House Democrats, who were in the majority at the time, believed the firings were politically motivated and wanted to force the pair to testify about them.

The House voted 223-32 to cite Miers and Bolten for contempt (most GOP members walked out in protest), but when Congress sued the pair, the case never made it to court. It was settled between the two sides with mixed results: The House got some of the testimony it wanted, but not until 2009, when Obama was in office.

The real aim of Congress had been to preserve oversight of the Bush administration, but the chief executive had already left the White House when the information was made available.

Historically, presidents' claims of executive privilege rarely have been accepted by Congress. When power brokers from those two branches clash, it may be left to political expediency or the courts to sort out the competing interests.

When such a showdown among two co-equal political branches of government occurs, the judiciary in rare cases becomes the referee.

The claim arises from the constitutional idea of separation of powers. The concept is not a settled legal precept, since it has been open to varying interpretations, and it remains a controversial, litigated part of government business.

The main factor that courts usually use is internal deliberations, and respect that aspect of presidential power so he or she can get freely given advice from aides. Judges typically do not want to invade that privilege, but it has not been viewed as an absolute for everything that goes on in the White House.

Just as importantly, the U.S. Constitution does not expressly mention this idea of executive privilege.

President George Washington set the precedent in 1796 when he refused a House request for documents relating to how the Jay Treaty with Great Britain was negotiated.

The Supreme Court first decided the issue in 1807, during Aaron Burr's separate trial for treason. Chief Justice John Marshall ordered President Thomas Jefferson to produce a letter that might have exonerated the former vice president. The court concluded the Sixth Amendment right of compulsory process did not exempt the executive branch.

The letter was turned over, but its contents never were publicly revealed, at Jefferson's insistence. As with the Fast and Furious controversy, the Burr issue was privately negotiated, at least initially.

The Obama-era Fast and Furious dispute over document access was finally resolved by a federal judge in May, after the House Oversight Committee and Trump Justice Department reached a settlement.

It came around the same time as the House Judiciary Committee separately voted to hold Attorney General William Barr in contempt for refusal to comply with a subpoena for documents related to Robert Mueller’s special counsel Russia investigation.

The high court has not spoken with one voice on executive privilege.

CLICK HERE TO GET THE FOX NEWS APP

In 1927, it ruled that the executive branch was not protected from "legitimate" outside investigations. In 1948, presidential prerogatives were preserved in relation to private lawsuits where national security or military matters are involved.

Executive privilege claims have risen sharply since the 1950s, but most presidents since Dwight Eisenhower have assured Congress that such claims would only be asserted with their personal approval.

The biggest recent executive privilege case was U.S. v. Nixon in 1974, during the Watergate crisis. That involved a criminal grand jury subpoena for the president to turn over secretly recorded Oval Office audiotapes. The justices unanimously ruled against his legal claims, saying there was great national interest that the tapes be produced.

Nevertheless, for the first time the Supreme Court recognized the constitutional basis for executive privilege. "Nowhere in the Constitution ... is there any explicit reference to a privilege of confidentiality," that ruling said, "yet to the extent this interest relates to the effective discharge of a president's powers, it is constitutionally based."

The court then recognized that "those who expect public dissemination of their remarks may well temper candor with a concern for appearances and for their interest, to the detriment of the decision-making process."

In other words, the Supreme Court laid out a balancing test of sorts: a basic need for executive confidentiality and candor, weighed against the public interests of congressional oversight, a criminal inquiry or prosecution.

President Bill Clinton's first term produced an interesting legal dilemma that later popped in subsequent administrations. Then-first lady Hillary Clinton chaired a health care task force that was sued for closing to the public several meetings with government and private officials. The issue was whether she as the first lady was a government employee and therefore could claim executive privilege. A federal appeals court concluded she could.

The issue emerged again in 2001, when Vice President Dick Cheney was sued for his role chairing an energy task force. Only this time the issue was whether executive privilege applied to conversations by White House officials with those outside the government.

Cheney was taken to court by private groups and the Government Accounting Office seeking information on what energy company officials and lobbyists might have advised the group, whose conclusions later formed the basis of the administration's energy policy. A lawsuit claimed those contacts improperly benefited private energy businesses.

The private lawsuit reached the Supreme Court after two years of legal wrangling, and the White House won a temporary victory. Justice Anthony Kennedy wrote, "Special considerations applicable to the president and the vice president suggest that the courts should be sensitive to requests by the government" in such appeals.

The government claimed in its legal brief that it is "clear that the president's authority to receive opinions from executive officers is not subject to interference from or control by other branches" of government.

The case was sent back to the lower courts and, after about five years, was settled without the government turning over the requested documents.

When it comes to the current dispute over the House impeachment inquiry, time may be on the side of the White House, if it is determined to see this issue played out in the courts. Any lawsuit could take many months, or even years, to be resolved.

Complicating matters, the use of contempt measures for executive privilege claims can blur the line between law and politics.

In the executive's limited favor, the president has two-plus centuries of precedent to rely upon, and no clear sign the courts currently want to resolve the issue with some bedrock finality.