One of Nato’s longest serving top officials, Secretary-General Jens Stoltenberg, stepped down on Tuesday, handing the reins to former Dutch prime minister Mark Rutte as the military alliance confronts some of the biggest challenges in its history.

The two men, who first sat together at Nato’s table 14 years ago as the leaders of Norway and the Netherlands, greeted each other warmly outside the alliance’s Brussels headquarters, before laying a wreath to fallen military personnel, surrounded by the flags of the 32 member countries.

“Mark has the perfect background to become a great secretary-general,” a visibly emotional Mr Stoltenberg said as he ended a decade in office.

Mark Rutte, left, and Jens Stoltenberg attended a wreath-laying ceremony at Nato headquarters in Brussels on Tuesday (Harry Nakos/AP)

“He has served as prime minister for 14 years and led four different coalition governments, so therefore he knows how to make compromises, create consensus, and these are skills which are very much valued here at Nato,” Mr Stoltenberg said.

Mr Rutte said he “cannot wait to get to work”.

He said his priorities would be Nato’s support for Ukraine, with the war now in its third year, increasing defence spending and strengthening partnerships that the alliance has established with other countries around the world, notably in Asia and the Middle East.

Mr Rutte also underlined the importance of keeping the trans-Atlantic bond between the United States, Canada and Europe strong, and expressed confidence that he could work well with whoever was elected to the White House.

Surveys suggest the US election in November will be a close race. It could see the return of Donald Trump, whose talk during his last term of office about low defence spending among European allies and Canada undermined trust of Nato member countries.

It became an existential challenge, as smaller members feared that the US under Mr Trump would renege on Nato’s security pledge that all countries must come to the rescue of any ally in trouble, the foundation stone the alliance is built on.

But Mr Rutte said: “I know both candidates very well.”

He praised Mr Trump for pushing Nato allies to spend more and for toughening their approach towards China.

Mark Rutte lay a wreath during the ceremony at Nato headquarters (Harry Nakos/AP)

He also hailed the “fantastic record” of Vice President Kamala Harris and described her as “a highly respected leader”.

“I will be able to work with both. Whatever is the outcome of the election,” Mr Rutte said.

Mr Stoltenberg, Nato’s 13th secretary-general, took over in 2014, the year that “little green men” from Russia infiltrated Ukraine. Moscow annexed the Crimean Peninsula, sparking a defence spending buildup at the world’s biggest security alliance that gathered pace over his term.

His tenure was surpassed only by Dutch diplomat Joseph Luns, who spent 12 years in charge of Nato.

Nato secretaries-general run the headquarters, drive the alliance’s working agenda and speak on behalf of the 32-nation organisation with one unifying voice. Continuity is usually the key word when they take up office.

Jens Stoltenberg made a statement at Nato headquarters (Harry Nakos/AP)

Mr Rutte becomes Nato’s top civilian official as Russia’s full-scale invasion of Ukraine approaches the 1,000-day mark.

“There can be no lasting security in Europe without a strong, independent Ukraine,” he said in his first speech on taking office, and he affirmed a commitment made by the organisation’s leaders in 2008 that “Ukraine’s rightful place is in Nato”.

Russian forces are making advances in eastern Ukraine. Ukraine’s army has a shaky hold on part of the Kursk region in Russia, which has provided a temporary morale boost, but as casualties mount it remains outmanned and outgunned.

Mr Rutte will have to find new ways to encourage support for Ukraine among the allies, whose ranks have swelled to 32 countries since the invasion as Finland and Sweden joined to seek protection from Russia under Nato’s security umbrella.

Mr Trump has been critical of US aid to Ukraine, and he suggested last week that Ukrainian president Volodymyr Zelensky should have made concessions to Russian leader Vladimir Putin before he launched his invasion in 2022.