U.S. House Speaker Paul Ryan said Tuesday he has been assured that President Donald Trump will not fire special counsel Robert Mueller, even though the president has criticized Mueller and his investigation of Trump's alleged 2016 campaign links to Russia.

Ryan, the leader of the Republican-controlled House of Representatives, did not say who gave him the assurance.

Ryan, however, told reporters that Mueller "should be free to follow through with his investigation to its completion without interference. Absolutely. I am confident that he will be able to do that.

"I received assurances that his firing isn’t even under consideration," Ryan said. "We have a system based upon the rule of law in this country. We have a justice system and no one is above that justice system.”

For months, Trump has assailed the investigations of his campaign and allegations that it colluded with Russians to help him defeat Democrat Hillary Clinton, a former U.S. secretary of state. He has called the accusations a "hoax" promoted by opposition Democrats to explain his upset victory, while the White House says he is frustrated by the length of Mueller's months-long probe.

Until the past few days, however, Trump had not directly attacked Mueller by name.

On Monday, Trump took to Twitter to brand Mueller's investigation as "a total WITCH HUNT with massive conflicts of interest!"

Earlier, he accused Mueller of political bias because of the several Democrats who are working on the investigative team, ignoring the fact Mueller was a registered Republican and years ago was named by Republican President George W. Bush to be the director of the Federal Bureau of Investigation.

Several Republican lawmakers say Trump would invite a constitutional crisis were he to fire Mueller. Senator Lindsey Graham, a Trump supporter, said it would be "the beginning of the end of his presidency" if Trump attempted to oust Mueller.

FILE - Special Counsel Robert Mueller departs after a closed-door meeting with members of the Senate Judiciary Committee about Russian meddling in the election and possible connection to the Trump campaign, at the Capitol in Washington, June 21, 2017.

Another Republican, Senator Orrin Hatch, said if Trump dismissed Mueller, it would be "the stupidest thing the president could do."

Some lawmakers have called for legislation to protect Mueller from being dismissed, a measure Trump would have to sign for it to become law. But Republican leaders have balked at taking up such legislation, saying it is not necessary because they do not think Trump will dismiss the prosecutor.

So far, Mueller has secured guilty pleas from, among others, Trump's first national security adviser, Michael Flynn, and a former foreign affairs adviser, George Papadopoulos, for lying to federal investigators about their contacts with Russia. Mueller is attempting to interview Trump under oath, but lawyers for the two sides have yet to agree on the scope of the questioning and no face-to-face meeting has been scheduled.