Threats against Kenya's judiciary are increasing after a Supreme Court ruling to invalidate President Uhuru Kenyatta's win in last month's election, the chief justice says.
The "savage" demonstrations were "intended to intimidate the judiciary", David Maraga said in a statement.
It comes as riot police fired tear gas at supporters of Mr Kenyatta amid protests outside the Supreme Court.
The court ordered a re-run after citing irregularities in the original poll.
This has been set for 17 October, however, on Monday the French IT firm which supplied the electronic voting system said it would struggle to be ready in time.
The opposition coalition, Nasa, has laid out a series of demands, which include re-tendering the printing of ballot papers and the sacking of election officials, that it says should be met before it takes part in the repeat elections.
On Tuesday, Mr Kenyatta said the election "must be done within 60 days" in accordance with the constitution, adding that it should be conducted by Kenya's Independent Electoral and Boundaries Commission (IEBC).
The Supreme Court's full judgment and further details on why the poll was annulled are due to be made public on Wednesday.
In response to Tuesday's demonstrations, Mr Maraga said that he and other members of the legal body which selects judges were "prepared to pay the ultimate price to protect the constitution and the rule of law".
His strongly-worded statement, which was made on behalf of the Judicial Service Network, condemned the "unlawful" acts of some of the demonstrators, which he said were "savage in nature".
His statement also accused police chief Joseph Boinnet of not providing adequate security to judiciary staff, suggesting that he "repeatedly ignored calls to act, exposing judicial officers, property and litigants in danger".
National police spokesman George Kinoti said he would await further details of the chief justice's criticism before responding, Reuters news agency reports.
By Wanyama wa Chebusiri, BBC Africa, Nairobi
This is an unprecedented stand from Kenya's judiciary, which has been under attack from the political elite in recent weeks.
It is being seen as a response to critics of the landmark Supreme Court ruling that invalidated the re-election of Uhuru Kenyatta, and the president's threat to "fix the judiciary" if he wins the repeat polls next month.
The statement will only bolster David Maraga's reputation for bravery and integrity in the eyes of many Kenyans, albeit maybe not supporters of the president.
The Supreme Court gave a 60-day deadline for the election re-run but a mixture of political posturing and logistical challenges have put this deadline at risk.
Opposition leader Raila Odinga has launched a full-throttled campaign for the sacking of electoral commission officials whom it blames for bungling the election.
While a petition has been filed against two Supreme Court judges, accusing them of professional misconduct for allegedly being in touch with lawyers representing Mr Odinga during the election case.
Legal experts say that the hardline stance by both candidates, in addition to a myriad of logistical challenges, leaves the country hurling towards a constitutional crisis if the repeat polls are not held by the 1 November deadline.
Kenya's election commission initially declared Mr Kenyatta, 55, the winner by a margin of 1.4 million votes but the result was immediately challenged in court by his nearest rival, opposition leader Raila Odinga.
Mr Maraga later said that the 8 August election had not been conducted in accordance with the constitution, declaring it "null and void".
Mr Odinga, 72, said the ruling marked "a historic day for the people of Kenya and by extension for the people of the continent of Africa".
However Mr Kenyatta's supporters have accused the Supreme Court of issuing an illegal judgment, arguing that the court should have ordered a recount of the votes.
The ruling did not attribute any blame to Mr Kenyatta's party or campaign.
Western diplomats have expressed their concern at the rising tensions in Kenya, urging politicians not to incite violence.