NEW YORK (Reuters) - U.S. shares recovered from five-week lows on Wednesday following a downturn on concerns over potential delays to President Donald Trump’s pro-growth policies, while European shares ended lower and safe-haven gold, U.S. Treasuries, and the yen rallied on those worries.

The benchmark U.S. S&P 500 stock index notched its first gain in five sessions after briefly hitting its lowest since Feb. 15. The FTSEurofirst 300 index of top European shares hit a roughly two-week low, however, as investors increasingly worried whether Trump would be able to push ahead with pro-growth policies.

Trump on Tuesday tried to rally Republican lawmakers behind a plan to dismantle Obamacare, his first major legislation since assuming office in January. Some investors fear that if the healthcare reform act runs into trouble or takes longer than expected to pass, then Trump’s tax reform policies may face setbacks.

The slight gains in the S&P 500 came after the index closed down 1.2 percent on Tuesday in its worst daily performance since Oct. 11. CBOE's VIX index .VIX, known as the "fear gauge," briefly topped 13 for the first time since mid-January on Wednesday.

U.S. and European shares were little affected by a deadly attack in London near the British parliament.

“Investors with a lot of cash used yesterday’s downturn and the morning’s weakness today as a buying opportunity,” said Alan Lancz, president of investment advisory firm Alan B. Lancz & Associates in Toledo, Ohio. He said, however, that U.S. stocks could slip again if Trump’s healthcare bill fails to progress.

MSCI's all-country world equity index .MIWD00000PUS was last down 1.04 points, or 0.23 percent, at 447.01.

The Dow Jones Industrial Average .DJI closed down 6.71 points, or 0.03 percent, at 20,661.3. The S&P 500 .SPX ended up 4.43 points, or 0.19 percent, at 2,348.45. The Nasdaq Composite .IXIC gained 27.82 points, or 0.48 percent, to 5,821.64.

Europe's broad FTSEurofirst 300 index .FTEU3 closed down 0.37 percent, at 1,475.46.

Spot gold prices touched a more than three-week high of $1,251.26 an ounce XAU= and the dollar hit a four-month low against the yen of 110.75 yen JPY=.

Yields on benchmark 10-year U.S. Treasury notes US10YT=RR hit a more than three-week low of 2.375 percent as their prices rallied. [nL2N1GZ1J4]

Benchmark Brent crude oil prices fell to a nearly four-month low of $49.71 a barrel LCOc1 and U.S. crude prices CLc1 hit their own nearly four-month trough of $47.01 after data showed U.S. crude inventories rising faster than expected.

Brent settled down 32 cents, or 0.63 percent, at $50.64 a barrel. U.S. crude settled down 20 cents, or 0.41 percent, at $48.04.

The dollar index .DXY, which measures the greenback against a basket of six major rivals, was last down 0.1 percent at 99.689 after hitting a nearly seven-week low of 99.547 earlier. [nL2N1GZ1JD]

“We are seeing a bit of a de-risking happening across markets right now,” said Karl Schamotta, director of global product and market strategy at Cambridge Global Payments in Toronto.