By the time he stepped back from the podium at the close of the question-and-answer session, hopes for an agreement were already fading, with the Kremlin saying it could not negotiate a cease-fire because it was not a party to the conflict, and Mr. Poroshenko’s aides saying there was no formal pact.

While Mr. Obama has said repeatedly that he does not see the Ukraine crisis as the start of a new Cold War, the episode is unleashing old tensions that create echoes among the Baltic nations — particularly in Estonia and others with Russian-speaking populations — of an East-West rivalry playing out uncomfortably close to their borders.

The president’s speech was part of a visit intended to show solidarity with fretful allies and reassure them — particularly newer NATO members and those bordering Russia — that the United States and Europe are serious about defending them from a newly aggressive neighbor. Mr. Obama met with the presidents of Estonia, Latvia and Lithuania here on the eve of the NATO summit meeting in Wales, which will be dominated by the question of how the alliance will respond to the crisis in Ukraine.

“The defense of Tallinn and Riga and Vilnius is just as important as the defense of Berlin and Paris and London,” Mr. Obama said Wednesday, invoking the founding principle of collective defense that undergirds NATO. “An attack on one is an attack on all, and so if, in such a moment, you ever ask again, ‘Who’ll come to help?’ you’ll know the answer: the NATO alliance, including the armed forces of the United States of America.

“We’ll be here for Estonia, we’ll be here for Latvia, we’ll be here for Lithuania,” the president said. “You lost your independence once before. With NATO, you will never lose it again.”

Also on Wednesday, Mr. Obama vowed to punish the Sunni militants whose videotaped beheadings of two American journalists had “repulsed” the world, and said that the United States would lead a regional and international coalition to defeat the terrorists.