Newly confirmed Secretary of State Rex Tillerson's most urgent task at the State Department isn't necessarily to manage the threat from Iran and North Korea, to recast relations with Russia and China, or to calm nervous allies in Europe and the Far East.
It will be to quell mass dissent among the State Department's vast staff and to counter a growing sense of demoralization by the nation's diplomats.
In a largely party-line vote, the former Exxon Mobil chief executive won Senate approval Wednesday by 56 to 43. Only three Democrats and one independent crossed party lines to join Senate Republicans, a sign of how divisive Tillerson's nomination has been. Hours later, he was sworn in as the new secretary of State.
Tillerson, 64, takes over a normally staid department that has been roiled by President Trump's efforts to shake up the U.S. foreign policy and national security establishment in pursuit of what Trump has called an "America First" policy.
Trump's critics describe confusion and concern at State as career diplomats and civil servants struggle with what they see as worrying overtures to Russia and seeming snubs of NATO allies, as well as an early dispute with Mexico and an executive order temporarily barring entry to visitors and immigrants from seven Muslim-majority countries.
"It has been head-spinning," said the U.S. ambassador to one of the nations affected by the Trump policy changes. The envoy did not want to be identified publicly criticizing the new administration.
Most of State's top political appointees have departed, as often happens when a new administration arrives. But so many Republican foreign policy veterans criticized Trump during the campaign, and now find themselves on the outs with the White House, that dozens of senior positions may remain empty for months.
Selecting replacements for those positions may put the former Texas oil man at odds with the White House, which already has taken heat for sweeping executive orders that government agencies say were issued without input from them.
Like Trump, Tillerson has no government or military experience. During a rocky Senate confirmation hearing last month, he faced sharp questions from Democrats about his personal friendship with Russian President Vladimir Putin, his refusal to condemn Saudi Arabia and the Philippines for human rights abuses, and his views on efforts to ease global warming.
"There's a new level of alarm," said Antony Blinken, who was deputy secretary of State under President Obama. He commented after the chaotic start of Trump's travel suspension Friday, which saw hundreds of people with valid U.S. visas and green cards suddenly detained at U.S. airports or stranded around the globe.
The State Department was not consulted before the order was issued, sources said, even though it is responsible for issuing visas and vetting refugees.
The concerns boiled over Tuesday when more than 800 U.S. diplomats, consular officers and other Foreign Service employees formally submitted a signed cable of dissent to Trump's order restricting travel from seven countries in an effort to prevent terrorism.
The dissent channel is a rarely used but time-honored system that allows State Department officials to offer signed opinions on foreign policy that diverge from the White House. The dissents are usually confidential, but this one — the largest ever by far — was circulated to U.S. embassies and consulates around the world.
"A policy which closes our doors to over 200 million legitimate travelers in the hopes of preventing a small number of travelers who intend to harm Americans ... will not achieve its aim of making our country safer," it states.
"Such a policy runs counter to core American values of nondiscrimination, fair play and extending a warm welcome to foreign visitors and immigrants."
When reports of the diplomats' mass dissent first emerged, Trump's team reacted sharply. White House Press Secretary Sean Spicer said Monday that "career bureaucrats" should "either get with the program or they can go."
Trump's critics viewed that as a veiled threat, noting that the dissent channel is designed to protect from retribution those employees who use it.
"This is antithetical to the culture of the State Department and the whole purpose of the dissent channel," said Rep. Adam B. Schiff (D-Burbank). Those who signed, he said, may now fear they are "blacklisted," their careers damaged.
Angst at the State Department was exacerbated by the abrupt ouster last week of several senior officials, including the undersecretary for management, Patrick Kennedy, and four members of his team.
Kennedy's departure was not unexpected. He had been a staunch defender of former Secretary of State Hillary Clinton, Trump's presidential rival, especially over her handling of the attacks that killed four Americans in Benghazi, Libya, in 2012.
But the abrupt removals left State rudderless in several essential areas of operations and security.
"As a career diplomat, I experienced many transitions and never saw anything like this dangerous purge of public servants now underway at State," Laura Kennedy, a former deputy secretary of State for Eurasia, said via Twitter.
Among those who resigned was Victoria Nuland, a career ambassador, assistant secretary of State and highly regarded hawk on Russia. Trump has openly praised Putin and has vowed to seek a friendlier relationship with Moscow.
Jon Finer, who served as chief of staff to former Secretary of State John F. Kerry, said it could take months to fill so many high-level positions, leaving a "gaping hole" in diplomacy as the new administration is tested around the globe.
Department veterans also decried what they described as a "no need to know" approach by Trump's aides, who they said had declined briefings by outgoing diplomats and had ignored policy papers prepared for the transition team.
Consultation with State might have spared the Trump administration its latest dust-up with Mexico.
As Mexican officials worked with the White House to prepare for President Enrique Peña Nieto's planned visit to Washington, Trump ordered construction to start on a border wall and repeated his campaign promise to force Mexico to pay for it. His aides proposed slapping a 20% tariff on Mexican imports.
Peña Nieto, who has repeatedly said Mexico will not pay for the barrier, canceled his trip in response.
The two leaders have since spoken on the telephone. Afterward they issued nearly identical statements, but Peña Nieto's said the two leaders agreed not to publicly discuss the wall, a detail not included in Trump's version.
Mexican sources said the U.S. president continued to insist that Mexico pay for building the wall, a nonstarter for Peña Nieto.
For more on international affairs, follow @TracyKWilkinson on Twitter
6:30 p.m.: This article has been updated to reflect Tillerson's swearing-in and additional editing for clarity.
2:35 p.m.: This article has been updated with Tillerson's confirmation by the Senate.