No one on Wall Street was interested when Charles E. Ryan wanted to sell a chunk of his Moscow investment bank nearly three years ago.

Russia's 1998 financial meltdown was still fresh in people's minds. The only serious bid came from Deutsche Bank AG.

"It was an article of faith among senior members of the Wall Street club that if you're the guy who leads a big push into Russia, it will be the thing that stops you from being CEO," Ryan recalled.

Now, the club has changed its tune. Most of the big U.S. banks that pulled out or scaled back in 1998, such as Goldman Sachs Group Inc., Morgan Stanley and Merrill Lynch & Co., are returning to exploit Russia's bull market and booming economy. Those that stayed, among them Citigroup Inc. and Deutsche Bank, are adding staff and boosting trading and sales. Deutsche said yesterday that it is buying the remaining 60 percent of Ryan's bank, United Financial Group, to add to the 40 percent it acquired in 2003.

Ryan, 38, will become head of Deutsche's entire Russia operation, which includes commercial and private banking, asset management and syndicated loans.

The German bank will pay about $420 million, according to people familiar with the deal, implying a valuation nearly four times as big as in 2003. That is a fair indication of how the Russian market, fueled by soaring prices for Russia's main exports -- oil, gas and metals -- has taken off in the past two years.

This has been a remarkable year for investment banking in Moscow, with an explosion of initial public offerings of stock, giant loans to Russian corporations, and frenzied merger-and-acquisition activity -- a lot of it from Russian companies buying assets abroad.

With Russian sovereign debt now pegged at investment grade by all three big credit-rating concerns, international banks have never before been so keen to lend to Russian businesses. Domestic borrowers have secured more than $36 billion in financing this year, more than double the $14.5 billion they raised in 2004. And according to Citigroup, Russian IPOs accounted for 10 percent of all European stock issues this year.

The excitement shows no sign of abating. "The next two to three years look to be very intensive here," said Bob Fernandez, president of J.P. Morgan Russia. Analysts say as many as 200 Russian companies have the financial wherewithal to launch IPOs in the next three years.

The bonanza has coincided with a stream of negative headlines from Russia. The government crackdown on Yukos Oil Co., the trial of its founder Mikhail Khodorkovsky on fraud and tax-evasion charges, and the Kremlin's tightening grip on the oil and gas industry sent a chill through the business climate.

But those events also created big opportunities for banks. Just as they scrambled to advise the Russian government when it was privatizing thousands of state-owned assets in the 1990s, Western banks are crowding in to get a piece of the action as the state takes back control of the energy sector. Banks lined up for deals like state gas monopoly Gazprom's $13 billion acquisition of closely held oil producer Sibneft this fall.

Nevertheless, there are some concerns that banks may be overlooking risks still associated with Russian companies. A director of Novolipetsk Steel last month resigned from the board after he was charged with fraud in a criminal case connected to a Russian iron ore producer. His departure came shortly before the steelmaker announced plans to float shares on the London Stock Exchange.

Such concerns haven't deterred the big players as they rush to ramp up their presence in Moscow. Morgan Stanley has invested more than $60 million in a local sales and trading operation -- one of its biggest commitments in Europe in several years. It says all its big Western corporate clients are looking at Russia, too. Citigroup and Dresdner Bank AG have set up local stock trading platforms, taking advantage of a stock market boom that has sent the benchmark RTS index up 77 percent this year.

UFG's Ryan came to Russia in 1991, the year the Soviet Union fell apart, to work with the European Bank for Reconstruction and Development in St. Petersburg. He soon was advising a team of young reformers on how to privatize city's assets. In 1994, he teamed up with Boris Fyodorov, a former finance minister and later Gazprom board member, to form UFG.

The group's first big test came in 1998, when Russia defaulted on $40 billion in domestic debt and most big banks all but closed down their operations here. In the years that followed, Moscow-based brokerage firms such as UFG began to dominate investment banking.

Local players got some of the big deals that large international banks would normally take on. For example, UFG advised BP PLC on its $7.5 billion joint venture with Russian oil company TNK in 2003. UFG also carved out a niche offering "gray schemes" that allowed foreign investors to get around restrictions on foreign ownership of local shares in Gazprom.

The Russian investment banking boom should continue next year, with IPOs of two huge state-owned companies: bank Vneshtorgbank and oil company Rosneft. One government minister has said the Rosneft offering could raise as much as $15 billion. Ryan predicts the planned lifting of limits on Gazprom share ownership will mean $3 billion of new investment in Russian equities.

"The Western view of this place has always oscillated wildly from euphoria to absolute, utter depression," Ryan said. "The biggest difficulty we have here is trying to stay on an even keel."

Charles E. Ryan, who chairs Moscow-based United Investment Bank, says the Western view of investment in Russia ranges from optimism to depression.