Kenya's opposition has won a key vote for Speaker at the first meeting of parliament after disputed elections that sparked a wave of violence.
Raila Odinga has the largest party but not an overall majority
Its candidate won by just four votes after three tense rounds and following heated exchanges over ballot procedure.
The opposition, which says the presidential vote was rigged, feared the ballot for Speaker would be too.
Meanwhile, ex-UN head Kofi Annan has postponed his mediation trip for "a few days" because of flu, the UN said.
The parliament meeting was the first time opposition leader Raila Odinga and President Mwai Kibaki had been in the same room since the 27 December election. More than 600 people were killed in unrest that followed.
The vote for Speaker - the nation's third most powerful figure - began amid bitter clashes, with the opposition Orange Democratic Movement (ODM) calling for an open rather than secret ballot.
Senior ODM official William Ruto said: "We went through [national] elections with a secret ballot, and you stole the vote."
But government MP Mutula Kilonzo retorted: "You are now violating the very principle this country has been seeking."
After one false start, MPs were called forward to cast secret ballots into a transparent box in the centre of the chamber.
The first round ended with 104 votes for ODM-backed Kenneth Marende and 99 for the government-backed Francis ole Kaparo. In the second round Mr Marende took 104 and Mr Kaparo 102.
The third round, where a simple majority was sufficient, was tense, with MPs crowding around the count to dispute possible spoilt ballots.
The ODM erupted in celebration as it was announced Mr Marende had won by 105 votes to 101.
He was immediately sworn in and said he was "humbled and deeply touched by the confidence you have actively demonstrated in me".
Analysts say the vote highlights the difficulties Mr Kibaki will have in trying to govern after his disputed win.
Security was tight for the meeting, with troops deployed around the parliament building in Nairobi.
Opposition MPs had originally planned to sit on government benches.
But in the event, Mr Odinga took the seat reserved for the leader of the opposition.
His followers declined to stand up as Mr Kibaki entered the chamber - an indication that they do not regard his election as valid.
The ODM is the largest party in parliament, though it does not have an absolute majority.
About 250,000 people fled or were driven from their homes after the election in a country once seen as a beacon of relative stability in East Africa.
The BBC's Adam Mynott in Nairobi says the level of violence in Kenya has fallen significantly, but tension remains very high.
Speaking ahead of parliament resuming, ODM MP Najib Balala said the party was still pressing for a new election.
Mr Annan has said he expects all sides to work hard for a solution
But he told the BBC's Network Africa programme: "We want to prove to the world we are not going to act in an uncivilised way, we are going to parliament, we are going to show that we are controlling parliament."
Justice Minister Martha Karua told the BBC she believed cooler heads would prevail.
"We are ready to navigate through a hung parliament through persuasion, through negotiations.
"We expect that eventually everybody will come to their senses, realise that we've got to learn to live with each other."
Mr Annan, the former UN secretary general, was due to arrive on Tuesday at the head of an African mediation team in an effort to bring about negotiations between Mr Kibaki and Mr Odinga.
But a UN statement said: "On his way to the airport in Geneva this morning... Kofi Annan was taken ill with a severe flu."
It said the mission to Nairobi would be postponed for "a few days".