BRUSSELS — Expressing alarm at the lethal escalation of political violence in Ukraine, the European Union and the United States scrambled for a quick response Wednesday, threatening punitive sanctions against senior figures in the Ukrainian government. The Obama administration later said it had placed 20 top Ukrainian officials on a visa blacklist.

European diplomats and senior officials in Brussels began working on the logistics of imposing sanctions, in preparation for an emergency meeting of European Union foreign ministers called for Thursday.

They also announced that the French, German and Polish foreign ministers would visit Kiev beforehand, to meet with members of the government and the opposition.

President Obama warned the Ukrainian military to stay out of the crisis. “We have been watching very carefully and we expect the Ukrainian government to show restraint, to not resort to violence in dealing with peaceful protesters,” Mr. Obama said during a one-day visit to Mexico to meet with Mexican and Canadian counterparts. “There will be consequences if people step over the line.”