Armin Laschet has won the backing of German Chancellor Angela Merkel's party to run as a centre-right candidate to succeed her in September's elections.
The leader of the Christian Democrat (CDU) was supported by 77.5% of the party's executive board members.
His rival Markus Söder, who heads the CDU's Bavarian sister party the CSU, was supported by 22.5% of the board.
Mr Söder said he accepted Mr Laschet's victory and only a united party could be successful at the polls.
Mrs Merkel, who has been chancellor since 2005, is set to stand down at the 26 September federal elections.
Mr Laschet, 60, was elected CDU leader in January, when he presented himself as the Merkel continuity candidate. He is the premier of North Rhine-Westphalia - Germany's most populous state.
A political survivor who has bounced back from previous defeats, he is known for his liberal politics, passion for the EU and ability to connect with immigrant communities.
Since 2018 Mr Söder, 54, has been premier of Bavaria, the prosperous south-western state which is home to BMW and some 550 aerospace companies. His poll ratings have been boosted by his performance during the pandemic, when he was seen to have acted quickly in closing schools and stopping large public events.
Conservatives under pressure
The CDU party's executive debated via video for six hours before making their choice, which came despite Mr Söder, the 54-year-old premier of Bavaria, having a clear lead in opinion polls. The youth wing of the two parties, the Junge Union, had thrown its weight behind him ahead of the meeting and some CDU state premiers said they favoured the Bavarian leader, too.
As leader of the CDU, the larger of the two conservative parties, Mr Laschet would normally be considered the natural successor.
Mr Laschet was elected as CDU leader in January.
Mrs Merkel did not publicly express a preference for either potential candidate. A candidate from the CSU has never won a federal election before. Two previous attempts by CSU leaders failed in 1980 and 2002.
However, the conservative alliance is facing a decline in popularity following the coronavirus pandemic, slipping to about 27% in polls.
With five months to go before the general election, they are under pressure from the Greens who announced a candidate for chancellor, Annalena Baerbock, for the first time in their history.
Ms Baerbock, 40, is likely to be the only woman in the race. She became joint leader of the Greens three years ago, having previously served as its spokesperson on climate policy.
She and her co-leader Robert Habeck have unified the traditionally fractious Greens behind a manifesto including tougher climate targets, tax increases for high earners but also a harder line relations with Russia.
The Social Democrats (SPD) have already announced their candidate for chancellor, Finance Minister Olaf Scholz. The SPD has been languishing in the polls, but Mr Scholz's own ratings are better, boosted by his role overseeing the emergency €750bn (£675bn; $884bn) funding package to help businesses survive the pandemic.