The Swiss National Bank shocked markets on Tuesday by setting an exchange rate cap on the soaring franc to stave off a recession, discouraging investors anxious about flagging global growth from using the currency as a safe haven.

Using some of the strongest language from a central bank in the modern era, the SNB said it would no longer tolerate an exchange rate below 1.20 francs to the euro and would defend the target by buying other currencies in unlimited quantities.

The move immediately knocked about 8 percent off the value of the franc, which had soared by a third since the collapse of Lehman Brothers in 2008 as investors used it as a safe haven from the euro zone's debt crisis and stock market turmoil.

Analysts said the SNB should be able to defend 1.20 as it can print unlimited francs but that long-term success depended on efforts to deal with the euro zone's debt problems given the relative strength of the Swiss economy and government finances.

The current situation therefore acutely threatens our economy and our labor market. It carries the risk of a recession as well as deflationary developments, SNB Chairman Philipp Hildebrand said.

The SNB will enforce this minimum rate with the utmost determination and is prepared to buy foreign currency in unlimited quantities.

The move was seen as a new shot in the currency wars, with Japan expected to try to weaken the yen if the Swiss action diverts more safe-haven inflows into the currency. Gold, which hit a record higher earlier on Tuesday, is also seen gaining.

Fears that the world economy may tip back into recession have spurred investors to dump riskier assets such as stocks and seek the relative safety of gold and the franc and yen.

As the SNB's pockets are very deep, it should succeed in stabilizing the rate above 1.20, Commerzbank economist Ulrike Rondorf said.

On the other hand, a further depreciation of the franc seems unlikely to us in the current climate. Uncertainty on the market is still very high, with no sign of the debt crisis in the euro zone abating at present, she said.

The SNB, which holds its quarterly monetary policy review on September 15, said that even at a rate of 1.20 to the euro, the franc was still high and should continue to weaken over time.

If the economic outlook and deflationary risks so require, the SNB will take further measures, it said.

The SNB has warned that economic growth -- already flagging in the second quarter -- is set to slow sharply in the coming months as the strong franc makes Swiss exports, from luxury watches to drugs, prohibitively expensive.

The franc nearly touched parity with the common currency on August 9.

It dived 8.5 percent against the euro after Tuesday's announcement to 1.203 francs at 6:51 a.m. EDT and dropped almost 8 percent against the dollar to 0.848.

That was the single largest foreign exchange move I have ever seen, said World First chief economist Jeremy Cook. This dwarfs moves seen post Lehman Brothers, 7/7, and other major geopolitical events in the past decade.

Swiss stocks, hurt of late by the strong franc, jumped, with the blue-chip SMI index trading up 4.3 percent.

EURO ZONE DEVELOPMENTS KEY

It will be the direction taken by the euro zone crisis that will determine how successful the SNB will be in protecting the Swiss franc from strength in the coming months, said Rabobank senior currency strategist Jane Foley.

The SNB also set a formal exchange rate target in 1978 -- above 0.80 francs per German Mark -- when the franc was soaring in the aftermath of an oil crisis, and successfully defended that rate, but at the price of soaring inflation.

It worked in the short term, but it came at an enormous cost and led to a huge burst of inflation, said Simon Derrick, head of currency research at Bank of New York Mellon.

The move now should work in the short term, but in the long term they are providing investors who are looking to exit the euro zone debt crisis with an easy route.

The SNB move came just after data showed Swiss inflation eased by more than expected in August, dipping 0.3 percent from a month earlier, lower than a median forecast in a Reuters poll for a fall of 0.1 percent.

The SNB temporarily managed to weaken the franc last month after it cut an already low interest rate target to nil on August 3 and boosted the amount of liquidity in the banking system. But the currency jumped again last week as worries about the health of the global economy intensified.

The SNB is seen in a strong position to follow through on the new target after top Swiss politicians and business groups expressed support for the central bank as the economy flags.

Such political solidarity is in contrast to earlier this year when the central bank came under fire for running up a huge loss in 2010 trying to keep a lid on the franc, prompting calls for SNB chairman Philipp Hildebrand to resign.

Political support for this measure is much higher now than last year, given the extreme moves in the franc in recent months. This likely implies a stronger commitment than during the 2010 intervention, said Goldman Sachs forex research head Thomas Stolper.

The SNB's forex holdings had already surged to 253.4 billion francs in August as a result of foreign exchange swaps the SNB launched to ease the franc.

Swiss Economy Minster Johann Schneider-Ammann, who has proposed 870 million francs in government aid to counter the impact of the franc, welcomed the SNB action: It has a material impact and especially a psychological impact.

The strong franc has started to dampen exports, hurting companies like speciality chemicals maker Clariant AG which cut its 2011 sales target on Monday, while the tourism sector is also suffering as foreign visitors stay away.

Hildebrand said the costs associated with capping the soaring franc would be high, but it was necessary to stop the currency's strength causing long-term damage to the economy.

The strong national currency is presenting existential problems not only to the export sector and tourism but the whole Swiss economy, Gerold Buehrer, president of business lobby group Economiesuisse, said in a statement.

It is central that politicians and business stand united behind the national bank.

The SNB step should also help economies in eastern Europe with two-thirds of mortgages in Hungary and about half of Poland's denominated in Swiss francs.

This unusual step by the Swiss National Bank should be seen positively, said UniCredit unit Bank Austria, the leading lender in emerging Europe.

But it added: For the holders of foreign currency loans this is by no means the all-clear.

(Additional reporting by Katie Reid and Caroline Copley; Editing by Hugh Lawson)