The man who led Namibia since independence 15 years ago, Sam Nujoma, has handed over power to his successor.
Pohamba is expected to follow Nujoma's policies
Namibia's new president, Hifikepunye Pohamba, who is 69, has been a close ally of Mr Nujoma for 40 years.
About 20,000 people filled an open-air sport stadium in the capital, Windhoek, in spite of heavy rain to witness the swearing-in of the new president.
Most Namibians regard Mr Nujoma, who fought for independence as a guerrilla leader, as the father of their nation.
"I accept this new duty as second president of Namibia with great humility," Mr Pohamba said in his inauguration speech.
"We must uphold the legacy of the founding president and continue with peace, stability and prosperity."
He was elected by Namibians in polls last November with his Swapo party also sweeping to victory in parliamentary elections.
But the results were called into doubt this month when opposition groups launched a high court bid to challenge the results.
Despite a recount marred by some spoiled ballot boxes, Mr Pohamba and Swapo were again declared victorious.
The BBC's Alix Kroeger says that Mr Nujoma hands over a country which is in better shape than many of its neighbours with high literacy and with most people having access to running water and electricity.
But land reform remains a potentially explosive issue in the country.
Nujoma remains in control of the ruling party
Mr Nujoma has in the past courted controversy by praising the policies of Zimbabwe's President Robert Mugabe, who has seized thousands of white-owned farms.
Much of Namibia's best farmland is owned by some 3,800 white farmers.
But under Mr Nujoma, Namibia kept to a policy of willing-buyer, willing-seller.
His successor, Mr Pohamba, has said that land reform is moving too slowly, and warned that popular anger could lead to revolution.
Mr Nujoma remains as head of his party, Swapo.