WASHINGTON — Deputy Attorney General Rod Rosenstein testified Tuesday that if the president ordered him to fire the special counsel handling the Russia investigation, he would only comply if the request was “lawful and appropriate.”

Rosenstein was answering questions from lawmakers regarding comments Monday from Christopher Ruddy, the chief executive of Newsmax Media and a friend of President Donald Trump, that Trump might fire Robert Mueller, who was recently appointed to lead the investigation into whether the Trump campaign coordinated with Russia to influence the 2016 presidential election.

Rosenstein said only he could fire Mueller, whom he described as operating independently from the Justice Department in his investigation.

“I am confident that he has full independence,” Rosenstein said in answer to a question from U.S. Sen. Jeanne Shaheen, D-New Hampshire.

Asked what he would do if the president ordered him to fire Mueller, he said, “I’m not going to follow any orders unless I believe those are lawful and appropriate orders.”

If Rosenstein were to move toward firing the special counsel, he would have to put the cause in writing, he said.

“If there were good cause,” I would consider it,” Rosenstein testified. “If there were not good cause, it wouldn’t matter to me what anybody says.”

Rosenstein was testifying in place of Attorney General Jeff Sessions, who over the weekend canceled his own appearance before the committee and instead agreed to testify in front of the Senate Intelligence Committee. That hearing will be public and is scheduled to begin at 2:30 p.m.

“I think he’s considering perhaps terminating the special counsel,” Christopher Ruddy said during an appearance on PBS’s “NewsHour.” “I think he’s weighing that option.” He also told PBS he thought doing so would be “a very significant mistake.”

Ruddy had been at the White House the same day, though White House press secretary Sean Spicer said he did not meet with the president. Ruddy seemed to derive his assessment at least in part from comments Jay Sekulow, a member of Trump’s legal, made over the weekend on ABC News’ “This Week.

Sekulow had said he was “not going to speculate” on whether Trump might remove Mueller, but he added he “can’t imagine the issue is going to arise.”

Spicer did not outright discount the notion of removing the special counsel, but he noted Ruddy was not a spokesman for Trump.

“Chris Ruddy speaks for himself,” Spicer said.

Later Tuesday afternoon, Democratic lawmakers intend to ask Sessions about his meetings with the Russian ambassador and the firing of former FBI Director James Comey when the former Alabama senator testifies Tuesday.

The 2:30 p.m hearing will be the first time that Sessions is questioned by lawmakers since January when he testified during his confirmation hearing that he did not communicate with any Russian officials during the presidential campaign, when Sessions acted as an adviser to Trump. He had to correct that assertion after the Washington Post revealed that Sessions twice met with the Russian ambassador during the campaign and did not disclose that to the Senate.

Sessions then recused himself in March from overseeing the FBI’s Russia probe and delegated that authority to his Rosenstein. Rosenstein last month appointed a special counsel to oversee the Russia investigation.

Sessions was supposed to testify before the appropriations committees, as past attorneys general have, but on Saturday, Sessions wrote the chairmen of both committees and said he was sending his deputy attorney general to testify in his place.

“In light of reports regarding Mr. Comey’s recent testimony before the Senate Select Committee on Intelligence, it is important that I have an opportunity to address these matters in the appropriate forum,” Sessions wrote. “The Senate Intelligence Committee is the most appropriate forum for such matters, as it has been conducting an investigation and has access to relevant, classified information.”

It was unclear over the weekend if the hearing would be open or closed, but late Monday morning, the committee’s chair and vice-chair, U.S. Sen. Richard Burr, R-North Carolina, and U.S. Sen. Mark Warner, D-Virginia, announced that the hearing would be public.

Sessions, a former Republican senator from Alabama for 20 years, is expected to face tough questions from his former colleagues on a number of fronts that he has never had to publicly address in detail.