Kakamega Senator Boni Khalwale has criticised the attack by President Uhuru Kenyatta on the opposition over claims it was brewing possible violence after the 2017 elections.

Is there a story unfolding in your community? Let Hivisasa know

The Senator said the opposition was just pushing for free and fair elections, and called on the President to work towards a credible election to avoid any possible chaos.

"Mr President, with due respect, the genesis of any post-election violence is the need for us to have a democratic election," he said Tuesday during NTV's AMLive show.

"If you warn the opposition of fanning for post-election violence, we also warn you about rigging the 2017 election. If you allow elections to be rigged, then forgive Kenyans if they become unruly. Post-election violence is something you can prevent by providing free and fair elections," he added.

On pulling Kenya out of the ICC, Khalwale said the move was unjustified.

"The President is considering pulling Kenya out of the ICC, yes, he will try but he is not going to succeed because to pull out of the ICC is a very stupid move to take," he said.