When the ax fell on Secretary of State Rex Tillerson, his spokeswoman was half a world away, a distance he and his inner circle preferred and enforced.

Yet it's Tillerson who's on his way out after his unceremonious firing by President Donald Trump, and Heather Nauert whose star is ascendant.

U.N. Ambassador Nikki Haley and Nauert are among the few women in the Trump administration with high-profile voices on foreign policy. Only three State Department officials — all men — now outrank Nauert, a former Fox News anchor who declined to comment for this story.

Get Breaking News Delivered to Your Inbox

Nauert's meteoric rise comes even though just a week ago she seemed not long for the job. Then Tillerson lost his.

She was denied the kind of close access to the boss that all recent successful State Department press secretaries enjoyed. So Nauert tried to defend Mr. Trump's top diplomat and explain his activities to reporters from around the world without being able to travel on any of Tillerson's international trips or attend most of his Washington meetings.

Frustrated at being sidelined, Nauert almost quit several times. She had been telling associates she was ready to move on.

The moment that Mr. Trump canned Tillerson by tweet, Nauert was in a Hamas-built tunnel on the border near the Gaza Strip, on a tour organized by the Israeli military to show U.S. officials the smuggling routes used by militants. Caught by surprise by the move back in Washington, Nauert cut the tour short and returned to Jerusalem to deal with the crisis. Soon, Mr. Trump also fired the undersecretary of state who publicly defended Tillerson.

The president named Nauert to that suddenly vacant position, near the top of the hierarchy of American diplomacy.

Nauert told associates she was taken aback and recommended a colleague for the job. But when White House officials told her they wanted her, she accepted.

The new role gives Nauert responsibilities far beyond the regular news conferences she held in the briefing room. She is overseeing the public diplomacy in Washington and all of the roughly 275 overseas U.S. embassies, consulates and other posts. She is in charge of the Global Engagement Center that fights extremist messaging from the Islamic State group and others. She can take a seat, if she wants, on the Broadcasting Board of Governors that steers government broadcast networks such as Voice of America.

Less than a year ago, Nauert wasn't even in government.

Nauert, who was born in Illinois, was a breaking news anchor on Mr. Trump's favorite television show, "Fox & Friends," when she was tapped to be the face and voice of the administration's foreign policy. With a master's degree from Columbia University's Graduate School of Journalism, she had come to Fox from ABC News, where she was a general assignment reporter. She hadn't specialized in foreign policy or international relations.

It was almost clear from the start that Nauert wasn't Tillerson's first choice.

She resisted the ex-oilman's efforts to limit press access, reduce briefings and limit journalists allowed to travel with him. Tillerson had preferred Genevieve Wood at the conservative Heritage Foundation, according to several individuals familiar with the matter who spoke on condition of anonymity because they weren't authorized to publicly discuss Tillerson's personnel decisions.

When Nauert arrived at the State Department in April 2017, she found relations between Tillerson and the diplomatic press corps in crisis. No longer were there daily briefings that had been a State Department feature for decades. Journalists accustomed to traveling with Republican and Democratic secretaries for decades found they were blocked from Tillerson's plane. Department spokespeople had no regular access to Tillerson or his top advisers.

Shut out from the top, Nauert developed relationships with career diplomats. Barred from traveling with Tillerson, she embarked on her own overseas trips, visiting Bangladesh and Myanmar last year to see the plight of Rohingya Muslims, and then Israel after a planned stop in Syria was scrapped. Limited to two briefings a week, she began hosting a program called "The Readout" on State Department social media outlets in which she interviewed senior officials about topics of the day.

All the while, she stayed in the good graces of the White House, even as Tillerson was increasingly on the outs. White House press secretary Sarah Huckabee Sanders described Nauert as "a team player" and "a strong asset for the administration."

And she didn't shy from taking on foreign foes.

"The idea that Russia is calling for a so-called humanitarian corridor, I want to be clear, is a joke," Nauert said at one recent briefing where she took Moscow to task for its actions in Syria, where it has used military power to support President Bashar Assad's government.

Such comments have earned her the wrath of Kremlin officials and state-run media. Faced with pointed questioning by reporters from Russian news outlets at her briefings, Nauert often has lashed out, accusing them of working for their government.

"You're from Russian TV, too. OK. So hey, enough said then. I'll move on," Nauert told a reporter last month after Russian President Vladimir Putin presented an animated film clip showing a missile headed toward the U.S.

The comment sparked an intercontinental war-of-spokeswomen.

"If the StateDept dares to shun our journalists alongside with calling them Russian journalists one more time, we will carry our promise. We will create special seats for so called 'US journalists,'" Russian Foreign Ministry spokeswoman Maria Zakharova tweeted.

It didn't end there.

First, the Russian Embassy in Washington congratulated Nauert "and, of course, all female employees" of the State Department on International Women's Day. Nauert responded with gratitude and a dig, saying Moscow should use the day to "live up to its international commitments & stop bombing innocent men, women & children in #Syria."