Mr. Putin took membership in the group so seriously that he went all out when it came time for Russia to host the annual meeting for the first time. He rebuilt a broken-down czarist-era palace outside his hometown, St. Petersburg, in part with the summit in mind, adding a series of new mansions to the grounds for each leader to stay in. The Kremlin hired a Western public relations agency to promote its status as host.

“Obviously, it’s mostly symbolic, but symbols do matter,” said Michael A. McFaul, the just-departed American ambassador to Moscow. “The G-8 was something they wanted to be part of. This for them was a symbol of being part of the big-boy club, the great power club — and the club of democracies, I might add.”

The Obama administration voiced satisfaction that the West was united in punishing Russia, both now and in future, if it does not reverse course. “There really wasn’t much disagreement” at the meeting either about Russia or the need to swiftly aid Ukraine, the senior administration official said.

Germany’s chancellor, Angela Merkel, who with her foreign minister has had the most contact with Mr. Putin and other Russian officials during this crisis, has been among the most forthright in rejecting Mr. Putin’s actions, despite the potential costs to Germany’s economy.

German businesses sold almost 40 billion euros of goods to Russia last year, and bought Russian imports of the same value, almost exclusively oil and natural gas supplies that meet about one-third of Germany’s energy needs.