Secretary of State Rex Tillerson insisted on Wednesday that he has "never considered leaving" his job and is committed to President Donald Trump's foreign policy goals.

Tillerson spoke at a hastily scheduled news conference after NBC News reported that he came close to resigning this summer but was urged to stay in the job until the end of the year. Citing multiple high-level administration sources, NBC said he referred to Trump as a "moron" in July following a meeting with the president's national security team.

"There has never been a consideration in my mind to leave," the top American diplomat told reporters Wednesday. "I serve at the appointment of the president, and I am here for as long as the president feels I can be useful to achieving his objectives."

Asked specifically whether he called Trump a "moron," Tillerson stopped short of denying it.

"I'm not going to deal with petty stuff like that," he said. "I'm not going to be part of this effort to divide this administration."

NBC's report included a denial from a State Department spokesman about the purported "moron" comment. The spokesman also denied to NBC that the secretary considered resigning over the summer.

Later Wednesday, Trump told reporters he had "total confidence" in Tillerson. He said he was "honored" by the secretary's comments and accused NBC of making up the report.

NBC has stood by its reporting.

Shortly before Tillerson spoke, Trump called the network "fake news" and said "they are a disgrace to good reporting." In a follow-up tweet, the president said the story "has just been totally refuted" by Tillerson and Vice President Mike Pence. During the summer, Pence gave Tillerson advice on how to ease tensions with Trump, NBC reported.

Trump: The @NBCNews story has just been totally refuted by Sec. Tillerson and @VP Pence. It is #FakeNews. They should issue an apology to AMERICA!

Despite Tillerson's comments, one widely followed analyst described the secretary's relationship with Trump as "fundamentally broken."

"This is not going to sit well with Trump," said the analyst, Ian Bremmer, president of Eurasia Group. "He's not going to forget about this. Once you've broken that relationship, getting it back is really hard."

Since Tillerson took the post in February, mixed messages repeatedly have come out of the White House and a State Department with diminishing relevance. The apparent strain between the president and secretary of State comes amid major international crises, including a potential nuclear showdown with North Korea.

On Saturday, Tillerson said the U.S. had reached out to Pyongyang in an attempt to de-escalate tensions over its missile tests and nuclear explosions. But on Sunday, Trump tweeted that Tillerson is "wasting his time" trying to negotiate with North Korea.

The president wrote: "Save your energy, Rex, we'll do what has to be done!"

Trump: ...Save your energy Rex, we'll do what has to be done!

Trump reportedly grew frustrated with Tillerson because of the slow pace in appointing staff at Foggy Bottom earlier this year. Tillerson elicited more of the president's ire when he was asked in August about Trump's values. The president had said some "very fine people" marched with the torch-bearing white nationalists in Charlottesville.

"The president speaks for himself," Tillerson told Fox News at the time.

On Wednesday, Tillerson highlighted what he deemed the administration's foreign policy successes. Among other things, Tillerson said the administration made progress in getting countries like China to peacefully pressure North Korea, pushing for sanctions on Pyongyang and getting Middle Eastern allies to commit more fully to fighting terrorism.

"We're just getting started," he added.

Disclosure: NBC and CNBC are owned by NBCUniversal, a division of Comcast.