Mr. Ushakovs, the mayor, added that many Latvians “still have some concerns about Russians, because of the very complicated history in the past.” Thousands of Latvians who survived mass Soviet deportations are still alive, for example. Conversely, Russians here “are not happy when they see fellow Russians burned to death in Odessa,” he said, referring to the deaths of some 40 people in violence in the Ukrainian port in May.

The divide, Mr. Pabriks stressed, “is not an ethnic issue. It is political.” Seeing Ukraine pulling out of Russia’s orbit reminds Russian speakers of how Latvia did the same as the Soviet Union collapsed. They have “a feeling of humiliation that the Soviet Union was dissolved. This is about perception of the world. They think, ‘Who are you, you small countries? You have no greatness.’ This is how they feel and this is why they don’t want to integrate.”

On the other hand, as Mr. Ushakovs put it, summing up the sentiments of more than a dozen conversations, “no one wants Ukraine here.” That nightmare, he argued, could not repeat in Latvia or the other small Baltic States, which are suddenly feeling vulnerable to Russian aggression, agricultural sanctions on produce from the European Union and Mr. Putin’s threats to protect Russian minorities outside Russia. Latvia and its neighbors, Lithuania and Estonia, which have smaller Russian minorities, have always been stable, with per capita gross domestic product in Latvia four times higher than Ukraine, the mayor said.

Mr. Pabriks, the former minister, estimated that approximately 60 percent of Russians in Latvia are sympathetic to Mr. Putin, and his cultivation of Soviet glory. “On the other hand, even 99 percent of the supporters of Putin in Latvia, I don’t think they are ready to do more than talk.”

Russia could make its influence felt in other ways. Latvia depends 100 percent on Russia for deliveries of natural gas. Although the country gets about one-third of its electricity from hydropower, and has shifted toward renewable energy, it is clearly vulnerable to pressure from Russia’s Gazprom, which has a large stake in Latvijas Gas, the natural gas company.

Reinis Aboltins, a researcher at the nongovernmental Providus Institute, cited a parliamentary vote last March postponing until 2017 what was supposed to be a mandatory diversification of the gas supply network as one example of Russia’s bringing pressure to bear. Yet dependence is to some extent mutual: Gazprom, which has never cut off delivery to the Baltics, also relies on part of the Latvian network to supply gas back into northwest Russia, including St. Petersburg.

For centuries, Russia and Germany have wielded influence here. Riga was an imperial port in czarist times. Russians have been a large minority here for more than 200 years. Today, as visitors drive in from the airport, the first commercial office is that of Siemens, the German engineering giant. The first gas station belongs to Russia’s Lukoil.