But the friend had changed.

In some ways, it was for the better. People were wealthier — despite the recent decline in the ruble and jump in inflation — and better traveled. The kindhearted woman who hosted me when I first moved to Moscow in 1997 said it best: “We don’t have to wash out our plastic bags anymore.” Her tiny salary had quadrupled since I’d last seen her. She had taken her first trip abroad — a package tour to Tunisia.

But there was a darker side. Society had grown more defensive, and self-conscious, like a teenager constantly looking at herself in the mirror. Oligarchs had always had exit ramps — a house in London and a second passport — but now my own friends were looking for escape routes.

Intellectuals pointed me to books on Berlin in the 1920s and the concept of “ressentiment,’’ a philosophical term that describes a simmering resentment and sense of victimization arising out of envy of a perceived enemy. It often has its roots in a culture’s feeling of impotence. In Berlin in the early 20th century, it helped explain the rise of German fascism. In Russia in August, it seemed to have many targets: Ukraine, gay people, European dairy products and above all the United States.

“America stuffs its democracy in our face,” bellowed a cabdriver named Kostya in the city of Nizhny Novgorod. (His main beef was with the “propaganda of pederasts,” using a derogatory word used to describe homosexuals, a few weeks after the Supreme Court’s approval of gay marriage.) “If you’re saying yes, yes, yes, all the time and nodding your head, well sometimes you have to say no,” he said, explaining that Russia had finally stood up to the United States.

There is, of course, a lot of history behind such sentiments. In the 19th century, Slavophiles and Westernizers clashed over the right path for Russia. There was obviously the fierce rivalry with the United States in Soviet times. Since then, there have been low points, often connected with American actions in the world. (The NATO bombing of Serbia in 1999 and the American invasion of Iraq are examples.) But nothing like the current opinion of America, which this year sank to its lowest level since the Soviet Union collapsed nearly 24 years ago, according to polling by the Levada Analytical Center in Moscow.