HARRISBURG, Pa. — The intensifying warfare in the former Soviet republic of Georgia has put a new focus on the increasingly hard line that Senator John McCain has taken against Russia in recent years, with stances that have often gone well beyond those of the Bush administration and its focus on engagement.

Mr. McCain has called for expelling what he has called a “revanchist Russia” from meetings of the Group of 8, the organization of leading industrialized nations. He urged President Bush — in vain — to boycott the group’s meeting in St. Petersburg in 2006. And he has often mocked the president’s assertion that he got a sense of the soul of Vladimir V. Putin, who was then Russia’s president and is now its prime minister, by looking into his eyes. “I looked into his eyes,” Mr. McCain said, “and saw three letters: a K, a G and a B.”

His hard line has been derided as provocative, and possibly dangerous, by some so-called realist foreign policy experts, who warn that isolating Russia would do little to encourage it to change. But others, including neoconservatives who deem promoting democracy a paramount goal, see Mr. McCain’s position as principled, and prescient. Now, with Russia moving forcefully into Georgia as Mr. McCain seeks the presidency, his views are being scrutinized as never before through the prism of Russia’s invasion.

For Mr. McCain, the conflict came after months of warnings about the situation in Georgia. Mr. McCain befriended Georgia’s president, Mikheil Saakashvili, over the course of several trips there, and even nominated him for a Nobel Peace Prize in 2005 (in a letter that was co-signed by Senator Hillary Rodham Clinton, Democrat of New York).