Ukrainian president Viktor Yanukovych says he has agreed to a "truce" with opposition leaders and a start to negotiations to prevent further bloodshed, after street violence in which at least 26 people were killed.

Protesters have been occupying central Kiev for almost three months since Mr Yanukovych spurned a far-reaching trade deal with the EU and accepted a $15 billion Russian bailout instead.

A statement on the presidential website says during talks with the three main opposition leaders, Mr Yanukovych had agreed a truce and "the start to negotiations with the aim of ending bloodshed, and stabilising the situation in the state in the interests of social peace".

Timeline of Ukraine protests

The statement, issued on the eve of a visit by the foreign ministers of Germany, Poland and France, appeared to indicate that riot police who on Tuesday night advanced on to Kiev's Independence Square would not take further immediate steps to break up the encampment of protesters.

Ukraine's former economy minister Arseny Yatseniuk, one of the opposition leaders, said in a statement on the website of his Batkivshchyna (Fatherland) party: "The storming of the Maidan (Independence Square) which the authorities had planned today will not take place.

"A truce has been declared. The main thing is to protect human life," he added.

Mr Yanukovych issued his statement after meeting with Mr Yatseniuk and the two other opposition leaders, boxer-turned-politician Vitali Klitschko and far-right nationalist Oleh Tyahnibok.

Mr Klitschko had previously walked out of a meeting with Mr Yanukovych, saying he could not negotiate while blood was being spilt.

The United States and the European Union are both laying the groundwork for sanctions against Ukraine if the violence does not come to an end.

Mr Yanukovych, backed by Russia, had denounced the recent bloodshed in Kiev as an attempted coup and his security service said it had launched a nationwide "anti-terrorist operation" after arms and ammunition dumps were looted.

EU leaders condemned what they called "the unjustified use of excessive force by the Ukrainian authorities" and called an emergency meeting of the bloc's 28 foreign ministers to discuss the crisis.

It is expected to consider sanctions targeted directly at Ukrainian leaders, including visa bans, and freezing their European assets.

US secretary of state John Kerry, on a visit to Paris, said Washington was ready to impose similar sanctions and that Mr Yanukovych has a choice.

"The choice is between protecting the people that he serves... [the] choice for compromise and dialogue versus violence and mayhem," Mr Kerry said.

"Our desire is for President Yanukovych to bring people together, dialogue with the opposition, find the means to compromise, put the broad interests of the people of Ukraine out front.

"We are convinced there is still space for that to happen. We hope very, very much that violence can be avoided."

US president Barack Obama has warned Ukraine of unspecified consequences if the violence in Kiev continues.

He said the Ukrainian military should not step into a situation that could be resolved by civilians.

"We hold the Ukrainian government primarily responsible for making sure that it is dealing with peaceful protesters in an appropriate way, that the Ukrainian people are able to assemble and speak freely about their interests without fear of repression," Mr Obama said.

Australian Foreign Minister Julie Bishop has condemned the violent developments in Ukraine and says it is deeply concerning that there have again been deaths.

"Both sides must put an immediate end to the violence. Using violence as a means to resolve a political crisis is a retrograde step, and seriously undermines the potential for negotiation," she said in a statement.

"I urge both sides to return to the political discussions which had shown positive progress over the last few days."

Ms Bishop says Australia's ambassador to Ukraine is based in Warsaw in Poland, but is currently in Kiev to monitor developments.

Day of mourning declared after deadly clashes

After a night of petrol bombs and gunfire in Independence Square, a trade union building that protest organisers had used as a headquarters stood blackened and gutted by fire.

Helmeted young activists used pickaxes, and elderly women their bare hands, to dig up paving to stock as ammunition.

Security forces occupied about a third of the square - the part which lies closest to government offices and parliament - with protesters reinforcing their defences on the remainder of a plaza they have dubbed "Euro-Maidan".

In a statement posted online in the early hours, Mr Yanukovych said he had refrained from using force during three months of unrest but was being pressed by "advisers" to take a harder line.

"Without any mandate from the people, illegally and in breach of the constitution of Ukraine, these politicians - if I may use that term - have resorted to pogroms, arson and murder to try to seize power," he said.

He declared Thursday a day of mourning for the dead. The state security service said it had opened an investigation into illegal attempts by "individual politicians" to seize power.