Markets in Moscow fell sharply for a time on Monday and then recovered after an escalation in the fighting between Russia and Georgia raised concerns among investors that the conflict might endanger Russia’s economic relations with the West.

Stocks dropped 5.7 percent at the open, to their lowest level since September 2006, as Russian troops crossed into Georgia amid heavy fightng, and Russian planes bombed targets across Georgia.

But stocks rallied after the Russian president, Dmitri A. Medvedev, said military operations in South Ossetia, the area in dispute, were nearing a conclusion.

The ruble also fell in early trading, before the Russian central bank intervened, buying its currency to provide support, traders said.

The Micex, Russia’s main stock market index, ended the day up 52.63 points, or 3.9 percent, to close Monday at 1,412.25. The index, which declined 5.2 percent Friday, when the violence was heating up, is down more than 27 percent from its May peak.

The conflict, which coincided with an unrelated fire on the Baku-Tblisi-Ceyhan pipeline in eastern Turkey, underscored the concern among some analysts about Georgia’s role as a transit route for Caspian oil.

The European Union has long called on Russia to open its oil and gas pipeline network to foreign companies. Brussels has actively sought to move oil from the Caspian Sea to the West through Georgia, avoiding Russia. That has not pleased Moscow.

“Russia has a very clear strategy and would prefer Europe’s gas to go via Russia and not via independent countries,” Dieter Helm, a professor of energy policy at Oxford University, told Reuters. He said Moscow had made no deliberate effort to disrupt supplies, but “it is not unhelpful to Russia that there is unrest.”

The conflict also has served as a reminder about the political risk of investing in Russia. But the market reaction suggested that investors were prepared to overlook some political risks as long as they thought the prospects for riches remained intact.

“Investors are concerned that it could more seriously damage relations between Moscow and the E.U.,” the chief strategist at UralSib Capital, Chris Weafer, said in Moscow, referring to the European Union. Europe is by far Russia’s most important export market and source of investment.

“It also raises questions about Russia’s political stability,” he added, noting that the prime minister, Vladimir V. Putin, had recently been taking a “very hands- on role” in the economy. The market, Mr. Weafer said, bounced back from its depths Monday “on a sense of relief that the worst-case scenario might be avoided.”

Russia has grown increasingly confident in its economy, as growing oil and natural gas production and high energy prices have bolstered its export revenue. Gazprom, the state-owned Russian energy monopoly, supplies more than a quarter of European natural gas needs, giving the Kremlin enormous leverage in its dealings with the West.

UralSib Capital estimates that Russia earns $1.2 billion a day from its oil and gas exports, with the volume of oil exports more than doubling, to about seven million barrels a day, from the time of the second Chechen war in 1999.

Russia posted a trade surplus in June of $18.9 billion, suggesting that its petrodollar wealth has given it the financial cushion necessary to weather a period of market instability if the conflict deepens or drags on.

Oil markets took the news largely in stride, after a sharp fall in crude prices last week. Crude oil for September delivery was down $1.76, or 1.5 percent at $113.44 in afternoon trading Monday in New York.

“The oil market is taking a cautious attitude at the moment,” said Olivier Jakob, an oil analyst at Petromatrix in Zug, Switzerland. A significant escalation in hostilities would probably send energy prices higher, he said, because of the likelihood of supply disruptions in Georgia. The strong gains by the dollar last week, however, are helping to keep oil prices down, he said.

Mr. Weafer, the financial strategist, said that despite the apparent strength of the Russian economy, it was “a bad time” to create uncertainty. The recent verbal attack by Mr. Putin on Mechel, a mining company, and a conflict between the British oil company BP and its Russian partners at the BP- TNK joint venture had contributed to perceptions that the Russian market was becoming less welcoming.

Russia, he says, needs access to foreign markets and needs to attract foreign companies to help it with the next step of building the economy. The country’s most important links are with the European Union, and it will seek to protect those.

Still, he said, the conflict with Georgia fit a pattern.

“It’s very much in keeping with the way the government pursues its objectives,” he said. “It ignores what everybody says and tries to repair the damage afterward.”