Kenya's President Uhuru Kenyatta and opposition leader Raila Odinga promised on Friday to unite the country after elections last year in which around 100 people were killed mainly in clashes between opposition supporters and security forces.

The surprise announcement is likely to lower political tension in a country that is East Africa's richest economy and a key regional hub for security, diplomacy and trade.

In a live television address with Mr Kenyatta on the steps of the president's office, Mr Odinga said the time had come to resolve their differences. It was the first joint public appearance of its kind by the two politicians since 2013.

Mr Kenyatta said: "We have a responsibility as leaders to find solutions. Elections come and go but Kenya remains."

The leaders said they had agreed to set up an office staffed by advisers to tackle issues ranging from opposition complaints over the election to tensions between ethnic groups and corruption.

Mr Kenyatta was sworn in last November for a second term after winning a presidential election re-run on October 26 that Mr Odinga boycotted. The fresh election was held after the supreme court nullified an August presidential poll.

Murithi Mutiga, a senior analyst with the International Crisis Group, said the meeting between the two "titans" of Kenyan politics was key because they have been feuding for so long.

"The symbolism is very important but it is vital that they also invest heavily in ensuring that a more lasting settlement emerges from their talks," he said, citing the need to stamp out violence every time elections are called.

The election season blunted growth in Kenya, East Africa's richest economy and a western ally in a volatile region.

In January, Mr Odinga took a symbolic presidential oath in a Nairobi park in a direct challenge to Mr Kenyatta.

Before the Friday meeting, the two men had defied calls from Kenyan civil society, religious leaders and western diplomats to hold talks to overcome deep divisions opened up by the disputed elections.

Mr Odinga said the opposition had decided to change tactics for the sake of the country's unity. "We refuse to allow our diversity to kill our nation," he said.

Allies in his Nasa coalition, including his running mate in last year's poll, Kalonzo Musyoka, said they were not aware of the meeting and promised to give a detailed statement later.

Mr Kenyatta and Mr Odinga issued their statement just hours before the US Secretary of State Rex Tillerson arrived in the Kenyan capital as part of a seven-day tour of Africa and one analyst said his visit could be linked to the rapprochement.

"The US should not be dismissed or discounted. They have successfully engineered this," said Aly Khan Satchu, an independent analyst in Nairobi.

One member of parliament said Mr Kenyatta, who is in his final term, and Mr Odinga, who turned 73 in January, may be keen on securing their legacies with the newfound unity of purpose.

Moses Kuria, a legislator for Mr Kenyatta's Jubilee party, said the meeting could be the start of ending the cycle of disputed elections and their ruinous impact on economic growth.

"We are the only country that goes for elections and ends up with an economic slump ... It is good for the country," he said.