MOSCOW -- Just how strained the longstanding alliance between Russia and Germany has grown was evident here on Friday, as President Vladimir V. Putin batted away complaints by the German chancellor, Angela Merkel, about Russia's human rights record.
Ms. Merkel arrived in St. Petersburg primed to press her counterpart on the battery of repressive measures he has introduced since returning to the presidency in May. She raised the case of the women in the punk band Pussy Riot who were sentenced to two years in prison for performing an anti-Putin song in a Moscow cathedral.
"That would also be cause for discussion in Germany if it were to take place in a church -- no question," she said. "But does that earn someone two years in a labor camp?"
Mr. Putin, who sometimes likes to throw his visitors off balance, parried her complaint about the band. "One of the girls," he said, had staged the hanging in effigy of a Jew in a Moscow supermarket to send the message that Jews should leave the city.
"We cannot be with you in support of people who hold anti-Semitic positions," Mr. Putin said, as Ms. Merkel looked on, tight-lipped. Though what Mr. Putin said is not accurate -- the staged hanging was a performance intended as a protest against homophobia, racism and anti-Semitism -- it put Ms. Merkel in an exceedingly awkward position, and she gave no response.
Russia has watched with irritation in recent months as the support of its closest Western European ally has weakened over the issue of human rights. Germany's special envoy on Russia, Andreas Schockenhoff, has criticized Mr. Putin's record so severely that Russia's Foreign Ministry has accused him of "making defamatory remarks."
As Ms. Merkel prepared to leave for Russia this week, lawmakers from her coalition urged her to rebuke Mr. Putin for cracking down on dissent. Ms. Merkel seemed poised to do so on Friday before private talks with Mr. Putin.
"I ask that not every bit of criticism is seen as destructive," she said. "Open a German paper and read what is written there. If I were always getting offended, I would not even last three days in my job."
Mr. Putin parried, suggesting that Western policy makers might not have a firm grasp of what is going on in Russia. "As for political and ideological issues, we hear our partners. But they hear about what is happening from very far away," he said.
Mr. Putin has made it clear that he intends to reformulate Russia's relationship with the West: foreign powers will be welcome as trading partners, but excluded from any role in Russian domestic affairs.
Mr. Putin's spokesman, Dmitri S. Peskov, said the $120 billion in annual trade between Germany and Russia would serve as an "air bag," making any serious breakdown in relations impossible. He said business interests would serve as a counterweight to the increasing number of German politicians calling for Berlin to distance itself from Moscow.
"It is not that this idea is being supported by everyone; there are lots of people in the Bundestag and government who, on the contrary, are in favor of further development of investment cooperation between the two countries," Mr. Peskov said. "This economic basement influences the political house which stands on it."
Indeed, Ms. Merkel had substantial business to do in Moscow. Russian Railways signed an agreement on Friday with Siemens, the German company, to buy 675 locomotives, a deal that analysts say could be worth several billion dollars. A binding contract is likely to be signed no later than 2014, the Interfax news service reported.
Tensions were clearly mounting before the visit, when Mr. Peskov told reporters, "We are well aware of the heightened anti-Russian rhetoric in Germany in recent weeks or even months." Russia has said it no longer acknowledges the authority of Mr. Schockenhoff, and Agence France-Presse reported that his aides had said he had been denied meetings with diplomats and had not been admitted to the Russian Parliament.
Fyodor Lukyanov, the editor in chief of Russia in Global Affairs, said Mr. Schockenhoff's criticisms would not have aroused such passions even a year ago. But they have come at a moment when Russia is striving to uproot the last vestiges of the 1990s, when Western governments stepped in to serve as guides in Russia's effort to build a post-Soviet state.
"President Putin's relationship with Chancellor Merkel has never been warm, but this time the atmosphere could be described as a political ice age," Mr. Lukyanov wrote in a Thursday column.
Mr. Putin took pains to discredit that idea on Friday, despite clear strains between the two leaders.
"We have differences of opinion; it is true that we argue, seek compromise, but this is by no means a gloomy atmosphere," he said. He also paid Ms. Merkel a lavish compliment, saying, "As to there being no German who could serve as a perfect model for us, there is one: Mrs. Federal Chancellor."
This article originally appeared in The New York Times.