Washington (CNN) President Donald Trump and his aides have discussed firing special counsel Robert Mueller for months, and the prevailing wisdom inside the administration is that the President has the authority to do so, a source familiar with the matter says.

Earlier Tuesday, press secretary Sarah Sanders said publicly that Trump believes he has the power to fire Mueller

She did not suggest Trump would be moving to do so.

The legality of firing Mueller has been a topic of conversation inside the White House since the indictments of Paul Manafort and Rick Gates last fall, the source said.

"Their interpretation is that they can do that," the source said.

A separate source familiar with the matter agreed that the administration believes Trump likely has the authority to fire Mueller.

But Trump has discussed whether he should fire Mueller with members of Congress, a source said. The President has been counseled by lawmakers that such a move would be disastrous for the midterm election in the fall.

"He's getting level-headed advice not to do that," the source said.

Under the special counsel regulations, Mueller may be "disciplined or removed from office only by the personal action of the attorney general" for misconduct or other good cause. Attorney General Jeff Sessions has recused himself from all matters related to the 2016 presidential campaign, so only Deputy Attorney General Rod Rosenstein has the power to fire Mueller.

Former acting Solicitor General Neal Katyal, who helped draft the special counsel regulations in 1999, has said the rules don't "foreclose the possibility of political interference in the investigation."

"Our Constitution gives the President the full prosecution power in Article II; accordingly, any federal prosecutor works ultimately for the President," Katyal wrote in The Washington Post . "The President, therefore, would have to direct Rosenstein to fire Mueller -- or, somewhat more extravagantly, Trump could order the special counsel regulations repealed and then fire Mueller himself."

Trump could also fire Rosenstein, for no reason at all, as a member of the executive branch.

Pressed again about legal scholars who believe the President could not directly fire Mueller without going through Rosenstein, Sanders backed up her assertion that Trump has the authority to fire Mueller on his own.

"We've been advised that the President certainly has the power to make that decision," she said, but did not elaborate further.

A spokesman for Senate Minority Leader Chuck Schumer strongly rebuked Sanders' statement.

"The (Justice Department) regulations could not be more clear; the President does not have the authority to remove special counsel Mueller. Because of the attorney general's recusal, only Deputy AG Rosenstein could remove the special counsel and it would have to be for good cause," said Matt House, a spokesman for the New York Democrat.

Asked about Trump's comments that the raid on longtime Trump attorney Michael Cohen's office and hotel room Monday is "an attack on our country," Sanders said she has nothing to add.

"I think that the President has been clear that he thinks this has gone too far and beyond that I don't have anything to add," Sanders said. "I think the President has been clear what his position is."