WASHINGTON — Legal experts testifying before a Senate panel were split Tuesday on the constitutionality of bills to protect special counsel Robert Mueller from being fired by President Trump or his surrogates in the midst of the Russia investigation.

Mueller is investigating Russian interference in the 2016 presidential election and possible collusion between the Trump campaign and Russian officials. Senators have introduced two bipartisan bills to try to protect Mueller from retaliation by Trump.

Trump has said he does not intend to fire Mueller, but he has frequently criticized the Russia investigation as "a witch hunt" and said Mueller would be "crossing a line" if he looked into the president's past business dealings with Russia.

"The bills have laudable goals, and it is heartening to see bipartisan sponsorship here," Akhil Reed Amar, a constitutional law expert at Yale Law School, told the Senate Judiciary Committee. "That said ... I believe that the bills in their current form are unwise and unconstitutional."

Amar said the bills, if passed, would likely be vetoed by Trump and invalidated by the courts for violating the constitutional principle of separation of powers. They attempt to give too much independence to the special counsel, an executive branch employee who can be fired for refusing to carry out a lawful order by the president, Amar said.

Read more:

Lawmaker: Roger Stone may face subpoena if he does not answer further questions for Russia probe

Grassley asks FBI if Trump was warned of Russian efforts to infiltrate his campaign

Senate panel to consider bills to protect special counsel Mueller from being fired

But Eric Posner, a law professor at the University of Chicago, and Stephen Vladeck, a law professor at the University of Texas, said they believe both bills are constitutional. They based that conclusion on a 1988 Supreme Court ruling in Morrison v. Olson that upheld a much tougher independent counsel law. Congress let that law expire in 1999, but the ruling still stands.

Posner said the bills' protection for Mueller and future special prosecutors "strengthens our democratic system of government by ensuring that the president complies with the laws enacted by Congress, and does not use his immense power over law enforcement to shield himself and his associates from investigation of wrongdoing."

Senators said they would be willing to tweak their bills to allay concerns posed by some of the experts, but they intend to move ahead with their legislation.

The Special Counsel Integrity Act, by Sens. Thom Tillis, R-N.C., and Chris Coons, D-Del., would allow a special counsel who is fired to challenge that dismissal in federal court. A panel of judges would have to review the challenge within 14 days. The legislation would be retroactive to May 17, when Mueller was appointed by Deputy Attorney General Rod Rosenstein.

"My bipartisan bill with Senator Tillis is about ensuring that the special counsel cannot be removed improperly, a protection that is critical not just for the current investigation but for investigations conducted by special counsels in the future," Coons said.

John Duffy, a law professor at the University of Virginia, said the bill's provision making it retroactive is "the most constitutionally troubling aspect" of the legislation. He said it singles out Mueller for special protection and could be an unconstitutional circumvention of the president's power. Tillis said Tuesday that he agrees that the retroactive date should be removed from the bill.

A second bill, the Special Counsel Independence Protection Act by Sens. Lindsey Graham, R-S.C., and Cory Booker, D-N.J., would require a judicial review to remove a special counsel from office. The attorney general would have to petition a federal court and establish that there was a "good cause for removal," such as misconduct, incapacity or conflict of interest.

Duffy said the bill could violate the Constitution by stripping the executive branch of power over hiring and firing and giving it to the courts. He suggested a possible alternative would be to require the attorney general to delay the firing of a special counsel for 14 days to give the special counsel time to file an action on his own behalf seeking judicial review of his removal. That would also give a court time to grant a preliminary injunction to stop the firing until after the case is heard, Duffy said.

Graham said he thought Duffy's recommendation was a good idea. He said he and Booker want Mueller "to be able to do his job without fear of reprisal."

Booker said Tuesday that Congress must follow Tuesday's hearing "with swift action to pass legislation to safeguard Mueller's ability to do his job effectively and to free him from retaliation from the president."

Shortly before the debate over the bills began, Chairman Chuck Grassley, R-Iowa, expressed frustration that FBI agents were refusing to cooperate with Mueller's investigation unless the special counsel agreed not to provide their information to Congress. There are three congressional committees conducting Russia investigations, including the Senate Judiciary Committee.

Grassley denounced the non-disclosure agreements between the FBI and Mueller as "essentially gag orders" that "thwart transparency." He said he is trying to get information about former FBI director James Comey's decision not to prosecute Hillary Clinton last year for her use of a private email server.

"The executive branch cannot avoid congressional oversight by signing agreements," Grassley said.

Read more:

Congress should protect evidence gathered by Mueller in Russia probe, experts warn

Congress struggles to figure out which Russia investigation trumps the others