Gold prices edged higher on Wednesday as some investors sought refuge in the precious metal after the global stocks tumbled and the U.S. dollar weakened.
Spot gold rose 0.4 percent to $1,194.12 per ounce by 4:52 p.m. EDT (2052 GMT). U.S. gold futures settled up $1.9, or 0.16 percent, at $1,193.4.
Stocks on major world markets fell to a three-month low, with the benchmark S&P500 stock index falling more than 3 percent, in its biggest one-day fall since February. The U.S. dollar index retreated from a seven-week peak hit in the previous session.
"The S&P500 is looking very weak and negative and that is putting fear into investors," said Michael Matousek, head trader at U.S. Global Investors.
"With the markets going down people are increasing their allocation towards gold."
Gold, however, has fallen over 13 percent since hitting a peak in April, with investors increasingly opting for the safety of the greenback as the U.S.-China trade war unfolded against a backdrop of rising U.S. interest rates.
Rising bond yields have also dampened the appeal of gold, which pays no interest. Higher U.S. Treasury yields can translate into more demand for the dollar, making bullion more expensive for holders of other currencies.

Gold prices were muted on Friday, stuck in a tight trading range as the dollar extended gains from the previous session when strong U.S. inflation data and trade war concerns boosted demand for the greenback.
Spot gold was down 0.1 percent at $1,245.61 an ounce, as of 0347 GMT. For the week, the metal was down about 0.7 percent.
U.S. gold futures for August delivery were little changed at $1,246.10 an ounce.
The dollar climbed to a six-month peak versus the yen on Friday and held firm near a 10-day high against a basket of currencies boosted by expectations U.S. inflation will pick up, although concerns about an escalation in U.S.-China trade tensions limited the greenback's gains.
U.S. consumer price data on Thursday showed a steady buildup of inflation that could keep the Federal Reserve on a path of gradual interest rate increases.
A stronger dollar and higher U.S. rates reduce demand for non-interest bearing gold as the metal becomes more expensive for holders of other currencies.
Elsewhere, the European Central Bank will keep rates at a record low for as long as needed to raise inflation, minutes of the bank's latest meeting showed.
Meanwhile, Asian shares rose on Friday following gains on Wall Street overnight, as concerns over an escalating U.S. trade war with China took a breather.
The United States and China could reopen talks on trade but only if Beijing is willing to make significant changes, U.S. Treasury Secretary Steven Mnuchin said on Thursday.

Gold prices nudged lower amid a steady dollar on Friday, with investors bracing for any impact on global markets from a deepening trade conflict between the United States and China.
The United States is due to begin collecting tariffs on $34 billion in Chinese goods at 0401 GMT on Friday.
U.S. jobs data later in the day was in focus as well.
Spot gold had fallen 0.3 percent to $1,253.11 an ounce by 0332 GMT.
U.S. gold futures for August delivery were 0.4-percent lower at $1,254.10 an ounce.
Gold prices were being weighed down by a steady dollar, said Helen Lau, analyst at Argonaut Securities.
If the trade war escalates and then China could sell U.S. treasuries and buy gold. This would be a big event.
Major currencies, including the dollar, trod water early on Friday as investor caution prevailed ahead of the deadline and the jobs data. Faltering Chinese markets dented Asian stocks in choppy trade.

Gold prices edged up early Friday after slipping to a more than six-month low in the previous session, as the dollar softened from recent highs, but the yellow metal was headed for its worst monthly performance since November 2016.
Fundamentals
* Spot gold was up 0.1 percent at $1,248.64 an ounce, as of 0053 GMT. It touched its weakest since Dec. 13 at $1,245.32 on Thursday.
* Bullion was on track for its third straight weekly decline, having slipped 1.6 percent thus far and was down about 3.8 percent for the month. It was also heading towards its worst quarterly loss since end-2016.
* U.S. gold futures were 0.1 percent lower at $1,249.90 an ounce.
* The dollar index which measures the greenback against a basket of six currencies, inched down 0.1 percent at 95.264. It hit a near one-year high at 95.531 on Thursday
* The U.S. economy slowed more than previously estimated in the first quarter amid the weakest consumer spending in nearly five years, but growth appears to have since regained momentum on the back of a robust labour market and tax cuts.
* The outlook for global growth has weakened in recent weeks and risks are skewed to the downside, due in part to increased protectionism, the European Central Bank said on Thursday.
* Bank of England Chief Economist Andy Haldane said on Thursday his unexpected vote to raise interest rates this month should not be considered "surprising or radical" after a decade of ultra-loose monetary policy.
