TORONTO - The Canadian dollar surged to a three-and-a-half year high Thursday as the Bank of Canada prepares markets for an eventual hike in interest rates while nervous investors diversify some holdings into the loonie.

The currency was up 0.43 of a cent to 105.98 cents US, its highest level since late November, 2007.

The dollar has surged more than 1.66 cents US since Tuesday when the Bank of Canada announced it was leaving its key rate at one per cent, but also set the stage for a resumption in rate hikes, possibly as early as the fall of this year.

Besides that, analysts say the loonie is benefiting from government debt worries in Europe and the U.S.

"As uncertainty in Europe continues to rise and problems in the U.S. remain at the forefront, there is likely increased appetite to diversify holdings away from both U.S. dollar and euro-based assets," said Scotia Capital chief currency strategist Camilla Sutton.

"Small open economies, with strong sovereign positions and flexible foreign exchange regimes, like the Canadian dollar, are in demand. We expect this is a long-term trend and one that will help to support CAD into year-end."

Meanwhile, a top eurozone official says European Union leaders are ready to sign off on a second bailout for Greece even at the potential cost of putting the country into default.

After Germany and France shelved a plan to levy a tax on the banks, investors are worried that an alternative way of getting banks involved in the second bailout of Greece will prompt credit rating agencies to slap a default rating on Greece. The worry is that plans to give Greece more time to repay its bonds to banks and other private investors could potentially threaten Greece's banking system and spark renewed concerns that much bigger economies such as Spain and Italy will get dragged into Europe's debt crisis mire.

Traders have also been looking to American lawmakers to find a way to get the U.S. debt limit raised and avoid a debt default before an Aug. 2 deadline.

Momentum on a separate bipartisan budget plan by the Senate's so-called "Gang of Six" seemed to ebb Wednesday. Critics warned the measure contains larger tax increases than advertised.

Commodity prices declined in the wake of data showing that Chinese manufacturing activity fell to a 28-month low in July following repeated rate hikes and other measures to cool an overheated economy. HSBC Corp.'s manufacturing index fell to 47.2 from June's 50.1 on a 100-point scale on which numbers below 50 show activity declining.

The Chinese economy has had a huge appetite for commodities, which in turn have lifted prices for oil and copper and resource stocks on the Toronto stock market. But the Chinese government has been trying to slow down the economy through interest rate hikes and larger reserve requirements for banks in order to bring down high inflation.

The September crude contract on the New York Mercantile Exchange dipped 30 cents to US$98.10 a barrel.

The September copper contract on the Nymex was off six cents to US$4.36 a pound.

Gold prices advanced after two days of declines, up $2.50 to US$1,599.40 an ounce.