“It was all quite quick and comfortable,” Timofey Matskevich, a small-business owner, said of transiting with his wife, Daria, through an airport serving Barcelona.

“They asked no questions, they stamped our passports and said, ‘Welcome to Spain,’ ” Mr. Matskevich said in an online chat from the apartment where he was staying, which he said had a marvelous view of the beach and the Mediterranean beyond.

“It’s a change in mentality,” he said. “You have more freedom to go somewhere, to see things. For the mentality of the country to change, to get rid of the Soviet legacy, you need to see other parts of the world.”

While the visa waiver for Ukrainians is the largest shift of the kind for former Soviet countries, most of Ukraine’s 45 million people cannot afford to go on vacation abroad. Citizens of Georgia and Moldova already qualified for short-term visa-free travel to most of Western Europe, and those of the Baltic countries, which are members of the European Union, can come and go as they please.

Mr. Poroshenko celebrated the change by opening a symbolic “door to Europe” that had been set up on a stage at a border crossing with Slovakia. To help illustrate what lay to the west, the door was surrounded by walls depicting the Eiffel Tower, the Colosseum in Rome, Dutch windmills and other European tourist sights.