The Swiss National Bank shocked foreign exchange markets by setting a minimum exchange rate target of 1.20 francs to the euro on Tuesday, saying it would enforce it by buying foreign currency in unlimited quantities.

The move immediately knocked around 8 percent off the value of the franc, which has soared as investors used it as a safe haven from the euro zone's debt crisis and stock market turmoil.

The current massive overvaluation of the Swiss franc poses an acute threat to the Swiss economy and carries the risk of a deflationary development, the SNB said in a statement.

With immediate effect, it will no longer tolerate a EUR/CHF exchange rate below the minimum rate of CHF 1.20. The SNB will enforce this minimum rate with the utmost determination and is prepared to buy foreign currency in unlimited quantities.

The SNB added that even at a rate of 1.20 francs 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.

The franc nearly touched parity with the common currency on August 9. It fell 8.5 percent against the euro after the announcement to 1.203 francs at 0821 GMT (4:21 a.m. ET) and also dipped almost 8 percent against the dollar to 0.8483.

One will think twice about speculating against this target because the SNB is with its back against the wall. They've exploited all other options, said Sarasin economist Alessandro Bee.

Short term its clearly positive because Swiss exporters get supported, he said. Longer term you could say it bears inflationary risks.

To cushion the economy from a downturn as the strong franc hurts exports, the SNB cut an already low interest rate target to nil on August 3. It is also boosting the amount of liquidity in the banking system, and had threatened further steps.

Those measures had temporarily helped the franc weaken, falling some 18 percent to a seven-week low, but it jumped again last week as worries about the health of the global economy intensified, increasing pressure on the SNB to act again.

Swiss Economy Minister Johann Schneider-Ammann called on the SNB on Monday to take action to counter the overvalued franc. Influential lobby groups had also called for stronger measures such as a temporary exchange rate target.

(By Emma Thomasson and Catherine Bosley)