The yen rallied for a fourth day running on Thursday, reaching a six-week high, as traders ditched their long-running bets against the currency and a plunge in global stocks drove investors towards traditionally safe assets.

The U.S. dollar slipped against other currencies as traders raised their bets on Federal Reserve rate cuts this year. It was last down 0.92% at 152.46 yen after slumping to 151.95 earlier in the London session, its lowest since early May.

"This is a case of so many people all trying to find the door all at the same time," said Jane Foley, head of FX strategy at lender Rabobank. "It seemed like everybody and his dog was shorting the yen, it was the funding currency for the carry trade."

Investors had been heavily shorting - or betting against - the yen, seeing little chance of the yawning interest rate gap between Japan and the U.S. closing meaningfully. That gap has made U.S bonds and the dollar look attractive and pushed the yen to a 38-year low earlier this month, prompting intervention from authorities.

Those assumptions have suddenly been questioned this week. Sources told Reuters that the central bank is likely to debate whether to raise interest rates next week, while traders increasingly expect Fed cuts.

The yen was also supported on Thursday by its traditional role as a safe-haven currency, as a tech-led sell-off in global stocks continued.

Investors have been rapidly backing out of so-called carry trades, in which they had been borrowing low-yielding currencies to buy higher yielders like the dollar. As investors undo those trades they have been buying back the yen, catapulting it higher.

CURRENCIES SHAKE

The dollar index, which tracks the U.S. currency against six others, was down 0.14% at 104.23.

China's yuan rallied as much as 0.8%, caught up in the yen rally and benefiting from bets on Fed rate cuts, and hit its highest since May at 7.205 per dollar.

The rise came even as the country's central bank surprised markets for a second time this week by conducting an unscheduled lending operation on Thursday at steeply lower rates, more monetary stimulus to prop up the economy.

Investors' risk aversion took a toll on the Australian and New Zealand dollars, which were already under pressure from weakening commodity prices. The Australian dollar tumbled 0.9% to $0.6519, its lowest since early May.

The unwinding of carry trades has also helped the low-yielding Swiss franc this week. The dollar was last down 0.84% against the franc, its lowest since early March at 0.8777.

Although the U.S. dollar often rises during a stock sell-off, analysts said mounting expectations for a Fed interest rate cut were pulling in the other direction.

The euro inched up 0.1% to $1.0847 while sterling was down 0.25% at $1.2874.

Former New York Fed President Bill Dudley said the Fed should cut rates next week in a Bloomberg column on Wednesday, citing recent employment data.

Traders now expect almost three 25 basis point reductions by December.

"If today's focus is on lower U.S. rates, then the dollar should come lower across the board," said Chris Turner, global head of markets at ING.

U.S. second-quarter gross domestic product data is due out later on Thursday and could cause further swings.

(Reporting by Harry Robertson in London; additional reporting by Rae Wee in Singapore; Editing by Philippa Fletcher, Kirsten Donovan)