(Reuters) - Former Federal Bureau of Investigation Director James Comey will testify on June 8 before a congressional committee investigating Russia’s alleged meddling in the 2016 U.S. presidential election.

FILE PHOTO: FBI Director James Comey testifies before the House Intelligence Committee hearing into alleged Russian meddling in the 2016 U.S. election, on Capitol Hill in Washington, U.S., March 20, 2017. REUTERS/Joshua Roberts/File Photo

Comey is expected to tell the Senate Intelligence Committee that President Donald Trump asked him to drop an investigation into former White House national security adviser Michael Flynn’s ties to Russia. Trump fired Comey on May 9.

Legal experts say that Trump could invoke a doctrine called executive privilege to try to stop Comey from testifying. But such a maneuver would draw a backlash and could be challenged in court, they said.

The following describes how executive privilege works and why it could backfire on Trump if he invokes it.

What is executive privilege?

Executive privilege is a legal doctrine that allows the president to withhold information from other government branches.

The U.S. Supreme Court ruled in 1974 in U.S. v Nixon that executive privilege can only be used in limited circumstances, such as protecting national security or preserving the confidentiality of sensitive communications within the executive branch.

How would Trump invoke the privilege to block Comey’s testimony?

Before invoking executive privilege, the president typically obtains a written memorandum justifying the decision from the Office of Legal Counsel, a division of the Department of Justice. The White House counsel is often informally involved in the decision.

After invoking the privilege, the president can direct current and former government officials to not divulge information.

Have presidents invoked executive privilege in the past?

The term was not coined until the 1950s, but most presidents have invoked some version of it, said Mark Rozell, a professor of government at George Mason University. President Barack Obama asserted the privilege in 2012 to block Congress from seeing documents relating to an investigation into Fast and Furious, a botched gunrunning operation conducted by the Bureau of Alcohol, Tobacco, Firearms and Explosives.

What are the odds that Trump would legally succeed in blocking Comey’s testimony?

Legal experts said Trump would face an uphill climb if he asserted executive privilege to stop Comey from testifying before the congressional committee.

Trump likely would argue that Comey’s testimony involves confidential conversations or matters of national security. But that claim would be undercut by the fact that the president has publicly discussed and tweeted about his conversations with Comey, said Rozell.

Trump faces another hurdle if he tries to block Comey’s testimony. If Trump pressured Comey to drop the Flynn investigation, as Comey is expected to testify, then Trump may have engaged in obstruction of justice, according to some lawyers. Executive privilege cannot be used to “cover up government misconduct,” said Andrew Wright, a professor at Savannah Law School.

If Trump invoked the privilege, could Comey disregard it?

Typically a president uses executive privilege to prevent government employees from releasing information. Comey is now a private citizen who does not have to worry about losing his job if he does not comply. Rozell said he knows of no legal sanction for ignoring an assertion of executive privilege, but that it would be “unprecedented” for an assertion of the privilege to be ignored.

Could Trump be challenged in court if he asserts executive privilege?

The president and Congress typically hammer out a compromise when they disagree about whether privilege can be asserted, said Rozell.

But there are instances of executive privilege being challenged in court. When Obama cited the privilege to block the release of documents relating to Fast and Furious, Congress sued and asked a judge to direct then-Attorney General Eric Holder to comply with its subpoena. A judge ruled last year that the Justice Department’s public disclosures about the controversy undercut the president’s executive privilege claim, saying that the Justice Department had already publicly revealed much of the information it said should be kept private.

It would be procedurally complicated to challenge a decision by Trump to block Comey’s testimony. First, Congress would have to issue a subpoena requiring Comey to testify. Then Congress would have to find Comey in contempt if he refused. Congress could then ask a federal judge to force Comey to comply with its subpoena. That litigation would lead to a ruling on whether Trump lawfully invoked executive privilege. “There is a path to judicial review, but a lot of things would have to take place,” Wright said.

What are the political risks if Trump tries to assert privilege?

Trump would surely face public criticism if he tries to stop Comey’s testimony, Rozell said. Critics could claim Trump is using privilege to thwart questions about potential ties between Russia and Flynn and Russia’s alleged influence on the election. “That’s the rub with executive privilege: It makes it look like you have something to hide,” Rozell said.