The yen rallied across the board on Thursday, reaching its highest against the dollar in more than a year, as investors worldwide fled carry trades in the wake of a global plunge in stocks which triggered safe-haven buying of U.S. Treasuries.

The yen rose against all major currencies and hit its strongest level since March 2006 against the euro as the unwinding of carry trades accelerated. In carry trades, investors finance purchases of higher-yielding assets by borrowing in currencies with lower interest rates such as the yen.

In the United States, the dollar gave up its earlier gains against the euro after a report showed housing starts in July fell more than expected, another sign that the U.S. economy may be faltering.

The strength of the yen has been driven by unwinding of positions that had been established over a very long period of time, said Meg Browne, senior currency strategist at Brown Brothers Harriman in New York.

The market is also very concerned there will be a slowdown of the U.S. economy, Browne added. There is concern that it will spread to the rest of the world.

The dollar was 1.6 percent lower against the yen at 114.51 yen, its lowest since July 2006. The euro slipped 1.5 percent to 153.70 yen, its lowest since March.

The selling in other cross-yen pairs exploded as options barriers were smashed and automatic sell orders triggered, with the Australian and New Zealand dollars on track for their steepest daily declines against the yen in about two decades.

The Australian dollar fell as much as 5.3 percent against the yen in intraday trading, which would be its biggest drop in 21 years, according to Reuters data. It last traded at 90.91 to the yen. And the New Zealand dollar slid 5.1 percent, its biggest decline in 20 years, to trade at 78.46 yen.

The Australian dollar has now lost about 12 percent in the last six sessions, while the New Zealand dollar is down about 14 percent against the yen.

The sharp increase in risk aversion came after shares in Countrywide Financial, the largest U.S. mortgage lender, plunged on Wednesday amid rumors it was having trouble raising funding.

The euro was little changed against the dollar at $1.3431. The dollar lost earlier gains against the euro after the U.S. Commerce Department said housing starts fell much more than expected in July.

Some very weak numbers, which certainly show that the U.S. housing market remains weak, said David Watt, senior currency strategist with RBC Capital Markets in Toronto. There has been such intense focus on the U.S. housing sector that any signs of weakness and its global implications, one of the factors spilling over into other markets, adds to the nervousness.

(Additional reporting by Nick Olivari, Rachel Braitman and Gertrude Chavez-Dreyfuss in New York)