(Adds close of U.S. markets)
* Stocks surge in global relief rally as Mideast tension eases
* U.S., Canada, Australia and Europe stocks reach new highs
* Gold retreats, yen slides to two-week low
By Herbert Lash
NEW YORK, Jan 9 (Reuters) - Crude oil prices slid and equity markets around the world set new highs on Thursday as investors took on greater risk in a relief rally after the United States and Iran moved to defuse escalating tensions in the Middle East.
Gold prices retreated further from a near seven-year peak scaled after Iran's missile strike on military bases housing U.S. troops in Iraq early on Wednesday. The attack came in response to last week's U.S. drone strike that killed a top Iranian general and raised fears of a greater regional conflict.
The safe-haven yen fell to more than a one-week low against the dollar while yields on U.S. government debt initially fell, pushed lower by a strong weekly jobless report.
Equities rallied on the de-escalation of U.S.-Iranian tensions and also got a boost from China's commerce ministry saying Vice Premier Liu He will sign a long-awaited Phase 1 trade deal in Washington next week.
MSCI's gauge of equity indexes in 49 countries hit an all-time high, as did the pan-regional STOXX 600 index in Europe and the three major stock indexes on Wall Street. The benchmark index in Australia set a record closing high and the main Canadian stock index hit an all-time high.
U.S. President Donald Trump refrained from ordering more military action and Iran's foreign minister said the missile strikes had "concluded" Tehran's response.
Trump's decision helped to soothe markets and increase demand for risk assets, said Brad Bechtel, managing director, Jefferies in New York.
"Trump completely downplayed the idea of going to war with Iran or even any sort of retaliatory measures," Bechtel said.
Traders said neither the United States nor Iran wanted to further escalate tensions.
"We are now getting back to the status quo that we saw before the Iran situation," said John Doyle, vice president of dealing and trading at Tempus Inc in Washington.
MSCI's all-country world index gained 0.68%, while the STOXX 600 index rose 0.31%. The MSCI emerging markets index rose 1.62rose 1.62%.
Germany's trade-sensitive DAX jumped 1.3%, helped by data showing better-than-expected industrial output in November that dispelled lingering worries about a recession in Europe's economic powerhouse.
On Wall Street, the Dow Jones Industrial Average rose 211.81 points, or 0.74%, to 28,956.9. The S&P 500 gained 21.65 points, or 0.67%, to 3,274.7 and the Nasdaq Composite added 74.18 points, or 0.81%, to 9,203.43.
Crude prices slid as the market shifted focus toward a rising inventory of U.S. crude stocks as prices receded to pre-crisis levels of mid-December. Oil prices later pared losses to trade near break-even.
Brent crude futures fell 7 cents to settle at $65.37 a barrel, while West Texas Intermediate settled down 5 cents at $59.56 after tumbling nearly 5% on Wednesday.
Crude oil stocks were up 1.2 million barrels in the week ended Jan. 3 at 431.1 million barrels, the Energy Information Administration said on Wednesday.
The yen, seen as a safe haven in times of geopolitical turmoil because of its deep liquidity, as well as Japan's current account surplus, quickly reversed gains made after the Iranian missile strike.
Another safe currency, the Swiss franc, also fell against both the dollar and the euro..
The yen weakened 0.33% versus the greenback at 109.50 per dollar. The dollar index, tracking the unit against six peers, rose 0.15%, with the euro up 0.01% to $1.1104.
Greater risk appetite was also evident in emerging markets. China's trade-exposed yuan reached a five-month high of 6.9281 per dollar, while South Africa's rand and Turkey's lira, which had been buffeted this week, rebounded.
U.S. Treasury yields fell after strong demand at a $16 billion auction of 30-year bonds drove their price higher. The benchmark 10-year note rose 6/32 in price to yield 1.8545%.
U.S. gold futures were down 0.4% at $1,551.80
Reporting by Herbert Lash, additional reporting by Gertrude Chavez-Dreyfus in New York and Tom Westbrook in Singapore; Editing by Bernadette Baum and Dan Grebler