Washington (CNN) -- The United States talked tough Wednesday about trying to halt escalating political violence in Ukraine, but analysts warned there was little that outside pressure could do, especially if the Ukrainian military gets involved on the side of the government cracking down on protesters.
President Barack Obama condemned the unrest that killed 26 people on Tuesday and began spreading Wednesday beyond Kiev, the Ukrainian capital, with reports of protesters taking over government buildings in the nation's western region.
Obama said the United States expected the Ukrainian government to show restraint against peaceful protesters, and he warned there would be unspecified consequences for excessive action. He made a point of saying the Ukrainian military should stay out of it, as it has so far.
Later in the day -- after Ukraine's president and opposition leaders agreed to a truce and to fresh talks -- Obama said he hoped this development will "provide space for the sides to resolve their disagreements peacefully."
Insisting that Ukraine isn't a pawn on some "Cold War chessboard" with Russia, Obama said that he hopes a unity government will be formed to pave the way for "fair and free elections."
"The situation that happened in Ukraine has to do with whether or not the people ... can determine their own destiny," he said.
Later, the United States issued a visa ban for 20 senior members of the Ukrainian government and others responsible for the violent crackdown in Kiev, a senior State Department official told reporters on a conference call.
However, Council on Foreign Relations President Richard Haass told CNN that the United States and its European allies have limited options for impacting the situation on the ground in Ukraine.
"My own hunch is this is going to continue to escalate," Haass said, adding that the main question was whether the military would side with the government by getting involved or back the protesters by remaining in barracks.
In what the senior State Department official called "a glimmer of hope," the Ukrainian government and the opposition announced a truce Wednesday night to allow for negotiations to restart with the aim at stabilizing the situation.
Earlier, Obama said while attending talks in Mexico with the leaders of Canada and the host country that "we're going to be watching closely and we expect the Ukrainian government to show restraint, to not resort to violence in dealing with peaceful protesters."
Ukraine's military a focus
Thousands of demonstrators have packed Independence Square in Kiev since November, when President Viktor Yanukovych reversed a decision to sign a trade deal with the European Union and instead turned toward Russia.
The unrest intensified after an anti-protest law went into effect. On Tuesday, the street clashes escalated dramatically, leaving 26 people dead and buildings on fire.
Vice President Joe Biden spoke to Yanukovych on Tuesday night to express "grave concern" over the crisis.
A readout of the conversation released by the White House said Biden told the Ukrainian leader that "the United States condemns violence by any side, but that the government bears special responsibility to de-escalate the situation."
Secretary of State John Kerry reiterated Biden's message on Wednesday, saying Yanukovych can choose either dialogue and compromise or violence and mayhem.
"It is in his hands to decide what the future of the Ukraine and the future hopes of his people will be, and we hope very much that violence will be avoided and compromise will be found," Kerry said.
Wednesday night, Ukraine military forces moved into defensive positions around military bases and weapons depots across the country, according to a U.S. defense official familiar with the latest intelligence.
The move was considered as defensive to secure facilities and weapons, and so far only involved military personnel rather than any widespread movement of armored vehicles, according to the defense official who spoke on condition of not being identified.
"We are encouraged the Ukraine military has not been brought into this crisis and we urge them to remain on the sidelines," said Pentagon spokesman Col. Steve Warren.
If the Ukraine military got involved in the fighting, "that would have consequences for our defense relationship," Warren added.
Ukraine cites terrorists for trouble
While Yanukovych's government has received most of the blame, Ukrainian officials blamed protesters for the escalating unrest.
Security chief Oleksander Yakimenko accused protesters of looting weapons and ammunition from government offices and announced a nationwide "anti-terrorist operation."
According to senior U.S. administration officials, such language by Ukraine signals a hardening government position against the protesters.
In a later conference call with reporters, the senior State Department official -- who spoke on condition of not being identified -- expressed concern over the replacement of Ukraine's military armed forces chief. No reason was given for the dismissal of Col. Gen. Volodymyr Zamana.
Russia, which has major historical and economic ties to the former Soviet territory, accuses the United States of playing a role in the widespread protests. The senior State Department official denied that on Wednesday, saying "we completely reject their notion that we have been interfering."
The visa bans announced Wednesday followed an earlier move in January when existing visas of some Ukrainians were revoked over previous unrest, the State Department official said.
This time, the 20 Ukrainians -- none of them from the military -- now banned from getting new U.S. visas "represent the full chain of command that we consider responsible for ordering security forces to move against" protesters on Tuesday, the official added.
Other sanctions in coordination with the European Union also could occur, according to the official, who declined to provide further details.
France also has threatened sanctions against Ukraine over the government's crackdown, with President Francois Hollande calling the protest violence "unspeakable, unacceptable, intolerable acts."
The Obama administration has come under increasing criticism for its foreign policy as talks have faltered on halting Syria's civil war, which left nearly 5,000 people dead in the last three weeks in a particularly violent stretch of the almost three-year conflict.
On Sunday, veteran GOP Sen. John McCain of Arizona called the U.S. policy in Syria an "abysmal failure and a disgraceful one."
CNN's Jake Tapper, Barbara Starr, Dana Davidsen, Chelsea J. Carter, Greg Botelho and Adam Aigner-Treworgy contributed to this report.