Kenya's President Uhuru Kenyatta and his main rival Raila Odinga have pulled out of two televised presidential debates ahead of the August 8 elections, their parties said.

Initially, the two frontrunners were to go head to head, while six smaller candidates would hold a separate match on Monday, with a second debate on July 24.

However, officials in both parties said Kenyatta and Odinga decided to pull out after they got wind of plans to change the format, pitting all eight candidates against each other.

"President Uhuru Kenyatta will not participate in the presidential debates," David Murathe, vice chairman of the ruling Jubilee Party, said on Wednesday, citing insufficient consultation and format issues.

READ MORE: Kenya's Ogiek win land case against government

A party official, speaking on condition of anonymity, said Jubilee had a problem with the president debating alongside "small" candidates.

"We cannot subject the president to such kind of debate, but if it is him and Raila it is fine. But for now it is a no from us," the official said.

Odinga's team also said he would not take part because of the new format.

"How do you really get into the meat of things in just two minutes each," said Odinga's top adviser Salim Lone. "It would be impossible to have a substantive debate."

Kenya held its first ever televised presidential debate in 2013, including both Kenyatta and Odinga. Afterwards, Kenyatta complained that he had been unfairly targeted by moderators.

Kenyans go to the polls next month in national elections choosing from 14,500 candidates contesting in a series of races for president, governor, parliament and county assembly seats.

The vote comes a decade after the worst electoral clashes in Kenyan history when more than 1,100 people were killed in politically motivated ethnic violence.

The presidential race is predicted to be close, with Odinga heading an unprecedented opposition alliance in the hope of winning in his fourth run for the top job.

The election could swing either way, with five million new voters among the 19 million registered compared with the 2013 presidential polls.

On Monday, the European Union warned against possible violence in the forthcoming elections, while advocacy group Human Rights Watch said it had documented cases of intimidation and threats.