* S&P 500 erases earlier gains
* European shares gain after four days of losses
* Oil prices pare gains on likely profit-taking
* Strong European earnings reports boost region's shares
* U.S. benchmark yields hit more than 2-wk lows
* Dollar gains ahead of Friday's U.S. jobs data (Updates to close of European markets, updates prices)
By Sam Forgione
NEW YORK, May 5 (Reuters) - U.S. shares erased earlier gains on Thursday after oil prices eased from their highs, removing some support from energy shares and risk appetite, while benchmark Treasury yields hit more than two-week lows ahead of the April U.S. employment report due Friday.
U.S. crude prices jumped by more than 5 percent before paring gains, with a huge wildfire near Canada's oil sands region and escalating tensions in Libya stoking concerns among investors of a near-term shortage in supply. Traders said oil prices likely gave back some gains on profit-taking. benchmark U.S. S&P 500 was mostly flat, while the S&P energy index .SPNY gave back some gains but remained 0.6-percent higher. Investors awaited monthly jobs data on Friday, which is expected to show nonfarm payrolls likely rose by 202,000 in April and the unemployment rate held at 5 percent.
Firmer oil prices lifted shares of major European oil producers, while encouraging European earnings updates from firms including telecoms group BT BT.L and oil company Repsol REP.MC helped prop up the stock market. The gains in European shares came after four days of losses.
"The fact that oil started off strong today and has weakened is probably a net negative for risk appetite in the near term," said Chris Konstantinos, head of international portfolio management at RiverFront Investment Group in Richmond, Virginia.
MSCI's all-country world equity index .MIWD00000PUS , was last down 0.3 percent, at 395.25.
The Dow Jones industrial average .DJI was last down 3.28 points, or 0.02 percent, to 17,647.98. The S&P 500 .SPX was last down 0.05 points, or 0 percent, at 2,051.07. The Nasdaq Composite .IXIC was off 0.77 points, or 0.02 percent, at 4,724.87. broad FTSEurofirst 300 index .FTEU3 ended 0.32 percent higher, at 1,306.87. crude prices LCOc1 settled up 39 cents, or 0.87 percent, at $45.01 a barrel. U.S. crude settled up 54 cents, or 1.23 percent, at $44.32 a barrel CLc1 .
U.S. Treasury yields fell, with benchmark 10-year yields US10YT=RR hitting their lowest level since April 18 of 1.745 percent as traders positioned for what they anticipated to be a below-expectations U.S. jobs figure.
The U.S. dollar rose against a basket of currencies for a third day as traders closed out profitable bets against the greenback before Friday's U.S. jobs report. dollar index .DXY , which measures the greenback's value versus six currencies, rose to its highest level in a week of 93.862 after falling to its lowest in over 15 months on Tuesday of 91.919.
The dollar also rose against the yen JPY= to a six-day high of 107.49 yen after hitting an 18-month low on Tuesday of 105.52 yen.
"We are seeing some short-covering lifting the dollar against most major currencies," said Ron Simpson, director of currency research at Action Economics in Tampa, Florida. "You can largely attribute it to tomorrow's nonfarm payrolls report."
U.S. gold futures GCcv1 settled down 0.2 percent at $1,272.30 an ounce.