Kenya's new president is a man facing charges for crimes against humanity at The Hague, but has pledged to "co-operate with all nations and international institutions" in his victory speech.
Uhuru Kenyatta won the election by 8,000 votes, which carried him over the 50% threshold to avoid a second round, but his opponent, Raila Odinga, the current prime minister, said he would challenge the results in the courts.
Kenyatta, the son of Kenya's first independent president, was charged with the crimes against humanity after 1,200 people died in violence in the aftermath of 2007's election.
Kenyatta is alleged to have orchestrated the murder, forcible deportation, persecution and rape of Odinga's supporters in the aftermath of the 2007 vote.
He said in his acceptance speech: "We recognise and accept our international obligations and we will continue to co-operate with all nations and international institutions – in line with those obligations," he said.
"Today we celebrate the triumph of democracy, the triumph of peace, the triumph of nationhood.
"My pledge to you is that as your president I will work on behalf of all citizens regardless of political affiliation. I will honor the will of Kenyans and ensure that my government protects their rights and acts without fear or favor, in the interests of our nation."
Odinga said "democracy was on trial in Kenya" and there had been "rampant" illegality in the voting process.
Tribal loyalties played a key role in the elections with Kenyatta belonging to the Kikuyu, the biggest of Kenya's many tribes. Supporters thronged through the streets dressed in red, his campaign colours.
The Foreign Office gave Kenyatta a cool reception, in a statement which did not even mention the victorious candidate by name.
The minister for Africa, Marks Simmonds, said in a statement: "I congratulate the Kenyan people for the peaceful and determined spirit in which Monday’s elections were conducted. Kenyans have expressed their sovereign will and I congratulate all the candidates who have been successful.
"This is a historic moment for Kenya, when the Kenyan people have come together at the ballot box to achieve the promise of the new constitution and choose their future leaders.
“I urge all sides to show patience and restraint, to accept defeat or take any disputes to the courts. I am confident that any disputes will be dealt with by the courts swiftly and fairly. I appeal to all parties to maintain the same peaceful and democratic spirit that we have witnessed so far.
“The UK greatly values its deep and historic partnership with Kenya, and will continue to work in support of stability, security, development and prosperity.”
Britain has said previously it would have only essential contact with Kenyatta as president.