Atiku Abubakar, former Nigerian vice-president, will lead the main opposition Peoples Democratic Party (PDP) into next year’s general elections.
Mr Abubakar, 75, polled 371 votes to beat 13 other candidates that included Rivers state governor Nyesom Wike and former Senate President Bukola Saraki.
More than 750 delegates voted at Saturday’s convention in Abuja.
Mr Abubakar campaigned on promises of a more decentralised government.
While thanking delegates for electing him, Mr Abubakar accused the ruling party of dividing Nigeria and causing economic hardship.
“The government of the APC [All Progressives Congress] has divided Nigeria along regional and religious lines,” he said.
“With you I pledge to ensure unity. I am going to deal with our security challenges in this country and to confront our economic challenges all caused by the APC government.”
The party was rocked this week by the withdrawal of its 2019 vice-presidential candidate, Peter Obi, who has also left the party, citing internal issues.
The primary was overshadowed by widespread accusations of vote-buying, with candidates accused of bribing delegates with as much as $10,000 to vote for them.
The PDP ruled Nigeria for 16 years after the return of democracy in 1999 until it was beaten by a coalition of opposition parties in 2015.
Since then, it has lost further ground to the APC, especially in southern Nigeria where two of its state governors have defected to the ruling party.
Atiku Abubakar has been a top civil servant, prominent businessman and philanthropist, mostly making his fortune in the oil sector.
This would be his sixth shot at the presidency and in February, he would be offering his credentials as a seasoned political operator and serial entrepreneur as the remedy for Nigeria’s ills.
From Nigeria’s north-east Adamawa state, Mr Atiku served as the vice-president between 1999 and 2007 during the two terms of President Olusegun Obasanjo.
He was also the PDP’s candidate in the last election, losing to President Muhammadu Buhari by more than three million votes.
Mr Atiku has advocated for the privatisation of Nigeria’s inefficient refineries, saying that he would sell them if he becomes president.
But his critics point to accusations of financial impropriety against him which they say make him unsuitable for top office in a country where corruption is a huge challenge.
He denies any wrongdoing and says the charges are politically motivated.
If elected, Mr Abubakar will be confronted by high unemployment, rising inflation and widespread insecurity.