* Oil steadies after early rise above $40
* Israeli air strikes go into third day
* China to build up oil reserves while price is low
(Recasts, updates prices, stock market detail)
By Edward McAllister
NEW YORK, Dec 29 (Reuters) - Oil prices rose on Monday amid concern that Israeli attacks on Hamas could disrupt Middle East crude oil supplies, but economic troubles limited gains.
U.S. light, sweet crude <CLc1> was up 18 cents at $37.89 a barrel by 1:28 p.m. EST (1828 GMT), off the session high of $42.20.
Oil is on track for a nearly 60 percent loss this year, the biggest annual fall since futures began trading 25 years ago.
London Brent crude <LCOc1> rose 33 cents to $38.70 a barrel, after touching a session high of $43.18.
"You had two different sides to the market: early on an initial emotional run up and, as the day wore on, cooler heads prevailed and selling started to come in," said Phil Flynn, analyst at Alaron Trading, Chicago.
Israeli aircraft attacked Hamas targets in Gaza on the third day of an offensive that has killed more than 300 Palestinians, many of them civilians. [
]The attacks enraged Arabs across the Middle East, raising concerns that the conflict could threaten oil supplies from the region.
But economic worries should outweigh geopolitics in the Middle East, with Wall Street hit by the failure of a $17.4 billion joint venture between Kuwait and Dow Chemical, potentially threatening Dow's acquisition of rival Rohm & Haas. [
]"Equities turned around after crude was up on Gaza, so that was a factor," said Gene McGillian, analyst at Tradition Energy in Stamford, Connecticut.
OPEC COMPLIANCE
Oil is down more than $100 a barrel from a record peak of more than $147 in July, depressed as the downturn in the world economy has hit demand for fuel.
Prices on Friday had broken a nine-session losing streak, partly on evidence of OPEC compliance with its biggest ever production cut, agreed in December, to fight the market's slide.
Libya has told oil companies to curb output by 270,000 barrels per day from Jan. 1, exceeding the reduction it needs under OPEC's agreement to cut output. [
]The Abu Dhabi National Oil Co, the UAE's main producer, said it would cut January and February oil exports by much more than some refiners had expected. [
]The allocations were among the first concrete examples that OPEC exporters were implementing the Organization of the Petroleum Exporting Countries' Dec. 17 deal to cut supplies by 2.2 million barrels per day.
Saudi Arabia, the world's largest exporter, had informed its customers of cuts even before the meeting.
OPEC has cut output three times in an effort to remove about 5 percent of world supply to halt the slump.
China's energy chief said the world's second-largest oil user after the United States would take advantage of falling oil prices to boost imports and build up its fledgling oil reserves. [
] (Additional reporting by Robert Gibbons in New York, Jane Merriman in London, Luke Pachymuthu in Dubai and Chua Baizhen and Jonathan Leff in Singapore; Editing by David Gregorio)