The central bank increased its policy rate to -0.25% from the -0.75% level it has deployed since 2015. The hike was the first increase by the SNB since September 2007.

The move followed a 0.75% rate hike by the U.S. Federal Reserve on Wednesday while the European Central Bank signaled last week it would raise its rates in July to check surging inflation in the eurozone which hit 8.1% last month.

"The tighter monetary policy is aimed at preventing inflation from spreading more broadly to goods and services in Switzerland. It cannot be ruled out that further increases in the SNB policy rate will be necessary in the foreseeable future to stabilise inflation in the range consistent with price stability over the medium term," it said in a statement.

"To ensure appropriate monetary conditions, the SNB is also willing to be active in the foreign exchange market as necessary."

The safe-haven franc's strength has dampened the impact of inflation in Switzerland by reducing price rises for fuel and food imports.

Still, the SNB raised its inflation forecasts for 2022 to 2.8% from the 2.1% it gave in March. It also expects inflation of 1.9% and 1.6% in 2023 and 2024, up from its previous view for prices rising by 0.9% in both years.

The SNB still expects the Swiss economy to grow by around 2.5% in 2022.

(Reporting by John Revill; Editing by Michael Shields)