* Q3 rally pushed crude prices to mid-2015 highs
* Analysts say oil markets have largely rebalanced
* U.S. rig count suggests further rise in shale output (Updates prices, adds Barkindo comments)
LONDON, Oct 4 (Reuters) - Oil prices fell on Wednesday, pulled down by caution that rising U.S. crude output could scupper a rally that lasted for most of the third quarter.
U.S. West Texas Intermediate crude futures were at $50.40 per barrel at 1315 GMT, down 2 cents from their last close. They fell below $50 earlier in the session.
Brent crude futures were down 4 cents at $55.96 a barrel. Earlier in the day, they fell as low as $55.38.
The drop came amid worries that a third-quarter rally that lifted Brent to mid-2015 highs by late September had been overdone. A resumption in output at Libya's Sharara oilfield added to the concerns.
"Fundamentals may not yet be strong enough to support a continued rally, especially in growth-dependent commodities such as oil," Ole Hansen, head of commodity strategy at Denmark's Saxo Bank, said in a quarterly outlook to investors.
The Sharara oilfield restarted on Wednesday. It had been producing more than 230,000 barrels per day (bpd) before armed brigades closed it on Sunday.
Still, market observers said a so-called rebalancing is well underway, meaning demand is no longer undershooting available supply.
The rebalancing is a result of strong consumption and also efforts led by the Organization of the Petroleum Exporting Countries to cut output by around 1.8 million bpd in 2017 and the first quarter of next year.
On Wednesday OPEC Secretary-General Mohammad Barkindo said he was confident that his organisation could restore sustainable stability to markets, while Russian President Vladimir Putin said he did not exclude an extension of the cuts until the end of 2018. Russia is part of the supply agreement.
But rising oil production in the United States, which is not involved in the deal, has prevented prices from climbing further.
"The production growth from non-OPEC countries is still there so I do not expect a price rise in the near future," Fatih Birol, executive director of the International Energy Agency, told Reuters.
U.S. output <C-OUT-T-EIA> hit 9.55 million bpd in late September, its highest level since July 2017, and drillers added six oil rigs in the week to Sept. 29, according to energy services firm Baker Hughes. <RIG-OL-USA-BHI>
Data on Tuesday from the U.S. American Petroleum Institute showed gasoline stocks rising last week by a larger-than-expected 4.9 million barrels, with crude stocks dropping by 4.1 million barrels.
Fuel inventory data from the U.S. Energy Information Administration is due later on Wednesday.
(Additional reporting by Henning Gloystein in Singapore and Ron Bousso in London; Editing by Dale Hudson and Louiae Heavens)