Muhammadu Buhari has been sworn in as Nigeria's president, promising to bring "increased prosperity" to Africa's most populous country.
He is the first opposition figure to win a presidential election in Nigeria since independence in 1960.
"I belong to everybody and I belong to nobody", he told cheering crowds at the inauguration in the capital, Abuja.
He vowed to tackle "head on" the issues of corruption and the insurgency from militant Islamist group Boko Haram.
Profile Of New President
Defeated in the last three elections, he achieved a historic victory in the 28 March election, becoming the first opposition candidate to defeat an incumbent.
Mr Buhari faced President Goodluck Jonathan, who is from the southern Niger Delta region, for a second time at the polls.
This time, he had the advantage of being the candidate of a united opposition grouping, the All Progressives Congress (APC).
The APC attracted heavyweight defectors from Mr Jonathan's People's Democratic Party (PDP), which has dominated the political scene since the end of military rule in 1999.
Mr Buhari has always been popular among the poor of the north (known as the "talakawa" in the north's Hausa language).
Now some feel his military background and his disciplinarian credentials are just what the whole country needs to get to grips with the Islamist insurgency in the north.
A Muslim from Daura in Katsina State, who has given his support to Sharia in the north, Mr Buhari has previously had to deny allegations that he has a radical Islamist agenda.
This proved a problem for him in the 2003 polls - he failed to secure much support among Christians in the south, where he was viewed with some suspicion.
But having escaped an attack on his convoy in Kaduna in July 2014, which bore all the hallmarks of a Boko Haram assassination attempt, he has promised to end the insurgency within months if elected.
He has blamed President Jonathan's weakness for its escalation and has refused overtures to participate in talks with the radical militant group.
His tough stance as a military commander in 1983 - when some Nigerian islands were annexed in Lake Chad by Chadian soldiers - is still remembered in the north-east, now the militants' stronghold, after he blockaded the area and drove off the invaders.
War Against Indiscipline
He ruled Nigeria from January 1984 until August 1985, taking charge after a military coup in December 1983.
It is a period remembered for a strict campaign against indiscipline and corruption, and for its human rights abuses.
- Age 72
- Elected president in 28 March poll
- Military ruler of Nigeria from 1984 to 1985
- Deposed in a coup
- Poor human rights record
- Seen as incorruptible
- Disciplinarian - civil servants late for work had to do frog jumps
- Muslim from northern Nigeria
- Survived an apparent Boko Haram assassination attempt