The vote, mostly along party lines, was by far the closest in at least half a century.
Fifty-six senators backed Tillerson, and 43 voted no. Every Republican favored Tillerson, along with four members of the Democratic caucus, Senators Heidi Heitkamp, Joe Manchin and Mark Warner as well as Angus King, an independent.
Democratic Senator Chris Coons did not vote.
Tillerson’s predecessor in the position, John Kerry, was confirmed by 94 to 3. Condoleezza Rice, the last secretary of state nominated by a Republican, was confirmed by 85-13.
Senate Democrats had tried, but failed, to delay the vote on Tillerson because of Trump’s executive order banning immigration from seven mostly Muslim countries and temporarily halting the entry of refugees.
They said they wanted to ask Tillerson more questions about the issue after Trump signed the order on Friday, prompting protests and chaos at airports across the country and uncertainty and disruption for travelers around the world.
But Republicans hold a majority of 52 seats in the 100-member Senate, and so far have confirmed all of the six Trump nominees who have come up for votes.
Senators had also expressed concerns over Tillerson’s ties to Russia after the executive spent years there working for the oil company. Some faulted him for failing to promise to recuse himself from matters related to Exxon Mobil businesses for his entire term as secretary of state rather than only the one year required by law.
Tillerson, 64, retired as chairman and chief executive of Exxon Mobil at the end of 2016 after a four-decade career at the company.
Republicans and other Tillerson supporters said they thought he would be a strong leader as the country’s top diplomat, citing his experience running a giant corporation operating on six continents.
They also said it was important to finalize Trump’s national security team quickly, to address international crises and reassure allies wondering about the new president’s “America First” foreign policy.