Bingu wa Mutharika has been sworn in as Malawi's new president as the sound of gunfire echoed in the distance.
The opposition says the polls were rigged
Opposition supporters set up barricades in suburbs of the largest city, Blantyre, claiming that the elections were not fair.
At least four people are reported to have died and police have used both live and rubber bullets.
International observers noted "serious anomalies" with the poll, concerning the voters' roll and media bias.
Taking the oath of office, Mr Mutharika said his priorities were tackling poverty and corruption.
"My point of departure is that Malawi is not a poor country, but it is the people of Malawi that are poor," he said.
He dismissed veteran opposition politician Gwanda Chakuamba's claims to have won the poll.
Bingu wa Mutharika, UDF: 35%
John Tembo, MCP: 27%
Gwanda Chakuamba, Mgwirizano: 26%
MCP: 60 seats
UDF: 49 seats
Mgwirizano: 28 seats
Independents: 38 seats
Source: Malawi Election Commission
"For someone who has come third, it is unbelievable for him to cry foul and declare himself president," Mr Mutharika said in his inauguration speech.
The stadium was only a quarter full, reports the BBC's Raphael Tenthani in Blantyre.
Our correspondent says that opposition supporters blocked roads to some townships with boulders.
The burnt-out wrecks of two lorries lay smouldering outside a warehouse where bags of maize, the staple of the Malawian diet, had been looted, reports Reuters news agency.
Over the weekend, offices of Mr Mutharika's United Democratic Front (UDF) were destroyed in Ndirande, outside Blantyre.
Several African leaders, including South African President Thabo Mbeki and Zimbabwe's Robert Mugabe, attended the inauguration.
Mr Mutharika's job of governing will be made more difficult because the former ruling Malawi Congress Party has become the largest party in parliament. It, however, failed to win enough seats to secure a majority.
Veteran opposition politician Gwanda Chakuamba insisted he had won and told the BBC he refused to accept the result.
Mr Mutharika, a former World Bank economist and planning minister, was the candidate of the governing United Democratic Front (UDF).
He was hand-picked by outgoing President Bakili Muluzi, who is bowing out after two terms as leader of one of the world's poorest nations.
John Tembo of the Malawi Congress Party came second and Mr Chakuamba of the Mgwirizano coalition third, according to the Malawi electoral commission.
Mr Chakuamba earlier claimed victory after complaining that delays in the count were politically motivated.
In Sunday's unrest, police fired tear gas and warning shots to disperse crowds of youths who had put up makeshift roadblocks on the edge of Blantyre.
Security was high in the city centre and streets were deserted, the Associated Press news agency reported.
Commonwealth and European Union observers had criticised the running of the election, which will also determine the make-up of the new parliament, for "serious inadequacies".
Mr Chakuamba accused the electoral commission of tampering with the results to guarantee the ruling party's victory.
Mutharika (r) voted in his home, tea-growing district of Thyolo
He said that his own monitors and independent observers put him in the lead, Mr Tembo second and Mr Mutharika third.
Even before the results were announced, Mr Chakuamba's supporters staged protests in Blantyre on Saturday to voice their anger at the conduct of the election.
Election officials deny vote-tampering.
Free and fair elections could be key for Malawi's capacity to secure development aid to deal with poverty and Aids, which affects 14% of the population.