Kenyan President Uhuru Kenyatta has vowed to “fix” the country’s judiciary, following the Supreme Court annulment of his election victory.

Mr Kenyatta’s win was yesterday declared “invalid, null and void” by four Supreme Court judges, who cited irregularities “in the transmission of results”.

A fresh election has been ordered for October.

But Mr Kenyatta, after initially calling for calm, has responded by saying “we clearly have a problem” with the judges who made the ruling.

Riots break out after Kenya election's contested result

Speaking at a party meeting at his official residence, Nairobi’s State House, Mr Kenyatta criticised the judges’ decision and said he would return to the issue if elected.

He said: “We shall revisit this thing. We clearly have a problem. Who even elected you? Were you? We have a problem and we must fix it.”

Mr Kenyatta argued that the results of MPs, senators and governors were transmitted and “no one asked any questions”.

He continued: “The Supreme Court sat and decided that they are the ones with a bigger power than the 15 million Kenyans who woke up, queued in lines, and voted for their preferred presidential candidate.

“As a Supreme Court, they cannot annul the wishes of the people. And we will revisit this thing.”

Analysts saw the president’s latest comments on the judiciary as a worrying development.

“It’s extremely unfortunate that Kenyatta seems to be issuing veiled threats at the judiciary,” said Murithi Mutiga, a Nairobi-based senior Africa analyst at the International Crisis Group.

The election annulment came after the opposition party, the National Super Alliance, filed a petition to the country’s Supreme Court to overturn the result, and unexpectedly won by four judges to two.

Chief Justice David Maraga said the vote was unconstitutional.

Opposition leader, Raila Odinga, hailed the result as a “historic day for the people of Kenya and by extension the people of Africa”.

But he also expressed concern over the integrity of election officials, calling for some to be prosecuted, and said it was “unimaginable” a new poll could be conducted in just two months.

Kenyan election annulled Show all 13 1 /13 Kenyan election annulled Kenyan election annulled Supporters celebrate in Mathare slum after President Uhuru Kenyatta's election win was declared invalid by a court REUTERS/Siegfried Modola Kenyan election annulled Judges stand to deliver their verdict at the Supreme Court in Nairobi, ordering a new presidential election within 60 days after cancelling the results of last month's poll AFP/Simon Maina Kenyan election annulled Kenyan opposition leader Raila Odinga waves at supporters as he leaves the Supreme Court AFP/Simon Maina Kenyan election annulled Supporters of opposition leader Raila Odinga cheer outside court after President Uhuru Kenyatta's election win was declared invalid in Nairobi Reuters/Baz Ratner Kenyan election annulled Supporters of opposition leader Raila Odinga celebrate in Kibera slum after President Uhuru Kenyatta's election win was declared invalid by a court in Nairobi Reuters/Thomas Mukoya Kenyan election annulled A supporter of opposition leader Raila Odinga eats a cob of corn and does the splits as he celebrates after hearing the verdict AP Photo/Ben Curtis Kenyan election annulled Supporters of opposition leader Raila Odinga celebrate after hearing the verdict AP Photo/Khalil Senosi Kenyan election annulled Supporters of The National Super Alliance (NASA) opposition coalition and its presidential candidate Raila Odinga celebrate in front of the Supreme Court after learning that the court ruled in favor of Odinga EPA/Dai Kurokawa Kenyan election annulled Supporters of opposition leader Raila Odinga kneel down and thank God as they celebrate after hearing the verdict, on a street opposite the Supreme Court AP Photo/Ben Curtis Kenyan election annulled Supporters of Raila Odinga celebrate after hearing the verdict AP Photo/Khalil Senosi Kenyan election annulled Supporter of opposition leader Raila Odinga celebrates after hearing the verdict AP Photo/Khalil Senosi Kenyan election annulled Supporters celebrate after hearing the verdict AP Photo/Khalil Senosi Kenyan election annulled Supporters of Kenya's opposition National Super Alliance (NASA) leader, Raila Odinga celebrate in the streets of Mathare slum in Nairobi Tony Karumba/AFP

Following the landmark judicial ruling, Mr Kenyatta first struck a conciliatory tone, saying: “Your neighbour will still be your neighbour, regardless of what has happened.

“My primary message today to every single Kenyan is peace. Let us be people of peace.”

The country was ravaged by post election violence in 2007, which left 1,200 people dead and another 600,000 displaced.

But later on Friday, he told a rally of supporters the judges were “crooks” and said Mr Maraga “should know that he is now dealing with the serving president ... We are keeping a close eye on them.”

His latest comments have added to anxieties over the potential fallout of the annulment.