WASHINGTON (Reuters) - The head of the U.S. Federal Reserve faces no risk of losing his job and President Donald Trump is happy with his Treasury secretary, a White House official said in an apparent attempt to calm Wall Street nerves frayed by Trump’s criticism of the Fed.

Asked on Wednesday if Fed Chairman Jerome Powell’s job was safe, White House economic adviser Kevin Hassett told reporters: “Yes, of course, 100 percent.”

Trump blasted the Fed on Monday as the U.S. economy’s “only problem,” and investors have closely followed reports the president had privately discussed the possibility of firing Powell. The U.S. central bank chief took his post early last February after being appointed by Trump and has continued the path of gradual rate hikes started by his predecessor, Janet Yellen.

Legal experts say it is not clear whether Trump could in fact dismiss Powell.

U.S. stocks edged up on Wednesday, with the S&P 500 .SPX up 0.2 percent in late morning trading. Stock prices have plunged in recent weeks on concerns about the economy. The S&P 500 index was on pace for its biggest percentage decline in December since the Great Depression

Hassett also said Trump was happy with Treasury Secretary Steven Mnuchin, who in recent days has talked with top U.S. bankers and convened a call with a working group of regulators who aim to keep financial markets running smoothly.

“I am highly confident that the president is very happy with Secretary Mnuchin,” Hassett told Fox Business Network.