To help ease tensions, Kenyatta on Tuesday met his political rival, the leader of the Coalition for Reforms and Democracy Raila Odinga, but the rare meeting between the two appeared to have little impact.
Police in Nairobi fired tear gas at people leaving a rally of the Coalition that was fully authorised and had passed without incident, a Reuters reporter at the scene said.
The opposition wants Kenya's Independent Electoral and Boundaries Commission scrapped, accusing it of bias. The commission's electronic identification system collapsed during the 2013 presidential election that brought Kenyatta to power.
In a speech at a separate event, Kenyatta said the opposition should use legal channels to seek changes to institutions, rather than demonstrations.
"The law is good when it favours you, but when it takes an unfavourable turn, you don't like it. We can't work like that. We must be a nation that follows the rule of law," the president said in a speech at a ceremony in the town of Nakuru to mark Kenya achieving self-governance in 1963.
His deputy William Ruto said the opposition should refrain from further protests, citing a court ruling that had banned them for marching.
"I now wonder if we want to transact the business of Kenya over a tete-a-tete or a cup of tea, or in street engagements, clouded by clouds of teargas," he told the same ceremony.
Speaking at the Nairobi opposition rally, Odinga said there was no such court ruling.
In late April, Kenya's High Court barred the opposition from storming the election commission's offices, but did not forbid them to protest.
Another lawsuit brought by ruling coalition lawmakers to stop Odinga from interfering with the running of the electoral commission is still with the court.
Ruto did not give any more details on the ruling he was referring to.
Odinga also told the rally that the coalition would on Thursday appoint five of its lawmakers who, alongside their counterparts from the ruling Jubilee Alliance coalition, would meet with the electoral body on Friday for talks.
"If the talks don't start on Friday, then on Monday we are going back to marching," Odinga told a crowd of about 10,000 supporters.