Pete Hegseth narrowly secured enough votes on Friday to become the next US defence secretary, a major victory for President Donald Trump after fierce opposition from Democrats and even some Republicans to his controversial nominee.

Hegseth was confirmed after a 50-50 vote in the Senate, when Vice President JD Vance came to the chamber to break the tie in his role as president of the Senate, after three Republicans joined every Democrat and independent in voting no.

He was sworn in on Saturday by Vance and in a message to the military stressed "restoring the warrior ethos, rebuilding our military, and re-establishing deterrence.”

"We will work with allies and partners to deter aggression in the Indo-Pacific by Communist China, as well as supporting the president’s priority to end wars responsibly and reorient to key threats,” he wrote. Hegseth, a former Fox News personality and decorated veteran, is promising to bring major changes to the Pentagon. But his leadership will be under intense scrutiny after a bruising confirmation review that raised serious questions about his qualifications, temperament and views about women in combat.

Hegseth is the most divisive candidate to clinch the US military’s top job, a position that has historically gone to candidates with deep experience running large organizations and who enjoy broad bipartisan support. (Agencies)