(Updates with Obama quotes and background)
By Mark Felsenthal
TOLUCA, Mexico, Feb 19 (Reuters) - U.S. President Barack Obama warned Ukraine on Wednesday that there would be consequences if the violence in Kiev continues, saying the United States holds the Ukrainian government responsible for dealing peacefully with protesters.
Speaking to reporters ahead of a meeting with Mexican President Enrique Pena Nieto, Obama 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," Obama said.
At least 26 people, including 10 policemen, were killed in Kiev Tuesday after riot police entered Independence Square and battled government protesters who have occupied the square since November.
The crisis erupted after Ukrainian President Viktor Yanukovich spurned a broad trade deal with the European Union and accepted a $15 billion Russian bailout.
The United States has said the Ukrainian government must pull back riot police from Independence Square in Kiev, call a truce and hold discussions with the opposition.
Obama, who is in Mexico for a summit with Canadian and Mexican leaders, condemned the Ukrainian violence and said the United States is working with European nations as well as the Ukrainian government and the opposition.
"We've also said we expect peaceful protesters to remain peaceful and we'll be monitoring very closely the situation, recognizing that with our European partners and the international community there will be consequences if people step over the line," he said.
"And that includes making sure the Ukrainian military does not step into what should be a set of issues that can be resolved by civilians," he said.
Earlier Wednesday, White House Deputy National Security Adviser Ben Rhodes told reporters the United States would consider the use of sanctions against those responsible for the violence in Ukraine.
"I think the scenes that we saw in Kiev yesterday were completely outrageous and have no place in the 21st century," Rhodes said.
He said the United States will be talking to European nations about the situation in Ukraine ahead of a EU foreign ministers meeting in Brussels on Thursday.
U.S. officials have previously said they were reluctant to impose sanctions, preferring to seek a diplomatic solution.
Rhodes said the United States would like to see Russia support efforts to reduce tensions in Ukraine.
"I think the message we've delivered to the Russians is that again we are not in some competition for the future of Ukraine. Frankly, our interest is that the people of Ukraine are able to determine their future, not any external actor," he said. (Additional reporting by Eric Beech and Roberta Rampton; Editing by Alistair Bell and Douglas Royalty)