Kenya's government said on Thursday it agreed in principle to creating a prime minister's post demanded by the opposition, a possible breakthrough in a political crisis some worry could explode into violence again.

Local and international pressure has grown for a deal to end the standoff over President Mwai Kibaki's disputed re-election on December 27. The opposition has threatened to resume street protests next week if its demands are not met.

Though the east African nation has been relatively calm for the last two weeks, the protest threat stoked fears of a resumption of the post-poll violence that killed at least 1,000 people and forced more than 300,000 out of their homes.

The unrest has damaged Kenya's reputation as a trade and tourism hub and one of Africa's most stable nations, usually the host of peace talks rather than the subject of them.

The African Union's new chairman, Jean Ping, flew into Kenya on Thursday to add his diplomatic weight to the crisis talks led by the former U.N. secretary general, Kofi Annan.

I'm beginning to see light at the end of the tunnel, Annan said in a statement after talks on Thursday.

Both teams were to meet with their leaders on a joint proposal that had been largely agreed on the governance structure before returning on Friday, the statement said.

Government negotiator Mutula Kilonzo earlier said the creation of a prime minister's post was the focus.

That is more or less agreed on. What we are discussing now is the post's functions, responsibilities, nature of appointment and so on, he told Reuters. This will be an interim measure.

'YOU'RE A DEMI-GOD'

Opposition leader Raila Odinga would be almost sure to take the post. He says Kibaki in the past reneged on a pledge to give him such a post in exchange for support at the 2002 election.

Asked if the job would have executive powers, Kilonzo said: We will not give anybody a hollow shell.

The opposition has demanded the post, wanting it to have real power, and a 50-50 split in cabinet jobs including what it views as top-tier ministries like finance and internal security.

A senior opposition official said there were two potential forms of the prime minister job being discussed.

One of them is some sort of chief minister ... or there is a head of government who is answerable to parliament. You have a real separation of powers, the official said.

Kilonzo said the interim post would come with a sunset clause that causes the position to expire either when parliament is dissolved or when a new constitution is enacted.

He said he expected the discussions over a political deal to be finished at the very latest by the weekend.

Both sides have agreed on the need for changes to Kenya's 45-year-old constitution, which many criticize because nearly all the powers rest with the president.

You're a demi-god. It allows impunity. You can appoint anyone, everyone, you can sack people at will, appoint your relatives, former anti-graft adviser John Githongo, a government critic, said at a speech in London on Wednesday.

The crisis laid bare issues of land, ethnicity, wealth and power that have dogged Kenya since the British colonial era, and have been habitually exploited by politicians over the decades.

The International Crisis Group think-tank, in a new report on Thursday, warned people not to be fooled by the relative calm in Kenya. The situation remains highly volatile ... Armed groups are still mobilizing on both sides, it said.

(Additional reporting by Jack Kimball and Andrew Cawthorne, editing by Andrew Cawthorne)