President Bakili Muluzi of Malawi publicly accepted defeat after a bid to run for a controversial third term was rejected by the country's parliament on Thursday.
The bill to change the constitution was introduced by an MP for the opposition Alliance for Democracy (Aford), Khwauli Msiska, who said: "This bill is not about the third term of office, it is not even about eroding our democracy. It is about empowering our people even more by enabling them to chose the president of their choice."
After a heated debate, the ruling United Democratic Front (UDF) party failed, by only three votes, to get the two-thirds majority needed to change the constitution.
Analysts suggested that the margin of defeat would have been greater if voting had been conducted by secret ballot.
Instead, voting was conducted publicly with parliamentarians having to call out their votes.
Muluzi tried to strike a conciliatory note in his radio address immediately after the vote. He said that he held no grudge against those who opposed him.
"Those that have succeeded in the present debate should as well accept the fact that they should reconcile their position with those that held opposite views so that everyone is taken on board," he said.
Up until this week, Muluzi has kept an official silence on whether he would run for a third term. Opponents said that Muluzi, under the pretext of inspecting development projects, had been campaigning in the country's rural areas, where he is reported to have significant support among chiefs and village elders.
The unofficial third term campaign sparked public demonstrations. Civil rights and church groups opposed the amendment and took to the streets in protest.
Muluzi responded by passing a decree banning demonstrations, saying they would spark anarchy and lead to civil unrest in the country.
The decree was declared unconstitutional by the courts, but that ruling was later overturned.
Public debates were not allowed in Blantyre, Lilongwe and Mzuzu as paramilitary police said they were security threats.