German conservative leader Friedrich Merz was elected chancellor by parliament in a second round of voting after his new alliance with the centre-left Social Democrats was dealt a surprise defeat in the first attempt.
Mr Merz's failure to win parliamentary backing at the first time of asking was a first for post-war Germany and an embarrassment for a man who has promised to revive economic growth at a time of global turbulence.
He won 325 votes in the 630-member assembly, with 289 voting against, attaining an absolute majority.
His CDU/CSU alliance won February's federal election and secured a coalition deal with the centre-left Social Democrats (SDP).
Their deal has mapped out plans to revive growth, such as reducing corporate taxes and lowering energy prices.
It is also promising strong support for Ukraine and higher military spending.
Mr Merz, 69, who began his political career as a European politician in 1989, has yet to demonstrate his leadership abilities in the political executive as his appointment marks his first time holding a government office.
Only one minister from the previous government will retain his position, Defence Minister Boris Pistorius. The rest of Mr Merz's cabinet are new appointees, many with private-sector experience.
Earlier, the vote had been widely seen as a formality, with Mr Merz backed by a coalition of his CDU/CSU alliance and the SPD who together have 328 seats.
Three MPs abstained, with one invalid ballot, while nine MPs were absent.
Members of the far-right Alternative for Germany (AfD) party - the largest opposition party, which scored a record of over 20% in the election - cheered the surprise result.
Germany's political drama has come at a time US President Donald Trump has upended long-standing transatlantic security and trade ties and rattled allies by reaching out directly to Russia to end the Ukraine war.
Mr Trump has heaped pressure on European allies, accusing them of spending too little on NATO and taking advantage of the United States through running trade surpluses, threatening tariffs especially painful to export power Germany.
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
Mr Merz, who boasts a strong business background but has never held a government leadership post, yesterday said "we live in times of profound change, of profound upheaval ... and of great uncertainty".
"And that is why we know that it is our historic obligation to lead this coalition to success," he said.
The alliance of Germany's two big-tent parties has vowed, once in government, to continue to support Ukraine as the United States looks to encourage a deal to end the war started by Russia's full-scale invasion over three years ago.
Expecting to take power, the coalition has already secured hundreds of billions of euro in fiscal firepower under a spending "bazooka" passed by the outgoing parliament.
Their stated aim is to rebuild crumbling infrastructure and the long-underfunded military while boosting an economy which has shrunk for two years.
Mr Merz has also vowed to curb irregular migration and deploy extra police to secure Germany's borders, putting an end to the open-door policy that welcomed millions of migrants under his party rival, ex-chancellor Angela Merkel.
The CDU leader has warned that only such drastic steps will prevent the AfD from potentially coming out on top in elections in four years' time.
The stakes were heightened when Germany's domestic intelligence service on Friday designated the AfD as a "right-wing extremist" party, reviving debate on whether it should be banned.
This sparked a furious response from Trump allies who have supported the anti-immigration AfD, with US Secretary of State Marco Rubio accusing the German spy agency of "tyranny in disguise".