Mike Pompeo has taken over as US secretary of state after being confirmed by the Senate and sworn in across the street minutes later.

The US’s top diplomat immediately dashed off to Europe, in an energetic start befitting the high-stakes issues awaiting him from Iran to North Korea.

The former CIA director secured support from 57 senators, with 42 voting no — one of the slimmest margins for the job in recent history.

Every past nominee to get a roll call vote since at least the Carter administration received 85 or more yes votes in the Senate, with the exception of Donald Trump’s first secretary of state Rex Tillerson, who got 56.

He was sworn in at the Supreme Court by Justice Samuel Alito, a fellow Italian-American, who said he was “proud” to officiate for the occasion.

Mr Pompeo, in a statement relayed by the State Department, said he was “delighted” to serve as America’s top diplomat.

“I am completely humbled by the responsibility and looking forward to serving the American people and getting to work right away,” Mr Pompeo said.

Then it was off to Andrews Air Force Base, where a US government aircraft was waiting to ferry Mr Pompeo to Brussels for meetings at Nato headquarters.

State Department staffers, demoralised after a tumultuous first year of Mr Trump’s administration, gave a round of applause to Mr Pompeo, who responded as he boarded the aircraft with a casual “hi, I’m Mike.”

Mr Pompeo, a Republican and former Kansas congressman, is expected to guide Mr Trump’s foreign policy in a more right-leaning direction than Mr Tillerson, the former Exxon Mobil CEO fired by Mr Trump on Twitter last month.

He inherits a State Department that has lost relevance under Mr Trump and a diplomatic corps deeply dispirited by the tenure of Mr Tillerson, who pushed budget and staff cuts and eschewed public appearances while leaving key diplomatic positions unfilled.

A long list of pressing issues awaits him, including a decision on the Iran nuclear deal, Mr Trump’s upcoming summit with North Korean leader Kim Jong Un and ongoing disagreements in the White House about the future US role in Syria.

Mr Trump said he was “pleased” by Mr Pompeo’s confirmation, calling him a “patriot” with “immense talent, energy and intellect”.

“He will always put the interests of America first,” Mr Trump said in a statement. “He has my trust. He has my support.”