* U.S. refineries restarting after hurricane shutdowns
* HSBC says convinced of longer-term upside to oil prices
* U.S. drillers cut most oil rigs since January -Baker Hughes (Updates with CFTC data, weekly increases, settlement prices)
NEW YORK, Sept 15 (Reuters) - Brent oil prices held near five-month highs on Friday and were on track for the biggest weekly gain since late July, on forecasts for rising demand and the gradual restart of U.S. oil refineries.
The Organization of the Petroleum Exporting Countries this week forecast higher demand for its oil in 2018 and pointed to signs of a tighter global market, indicating its deal with non-OPEC states to cut output is helping tackle a glut.
That was followed by a report from the International Energy Agency (IEA) saying the glut was shrinking thanks to strong European and U.S. demand, as well as production declines in OPEC and non-OPEC members.
"This boost to the market is attracting fresh speculative length," said Gene McGillian, director of market research at Tradition Energy in Stamford, Connecticut.
To sustain current high prices, continued strength in demand is needed, he said, noting that a weak fourth quarter in the United States could prompt traders to back off long positions.
Brent crude settled up 15 cents at $55.62 a barrel. The benchmark rose for the third straight week, increasing 3.3 percent, the most since the end of July.
U.S. West Texas Intermediate crude settled unchanged at $49.89 a barrel. The contract gained nearly 5 percent in the week, also its strongest in almost two months.
Hedge funds and other money managers cut their bullish bets on U.S. crude futures and options positions in the week to Sept. 12, the U.S. Commodity Futures Trading Commission (CFTC) said on Friday. In the previous week, speculators raised their crude oil net longs.
Data on this week's U.S. oil rig count, an early indicator of future output, showed energy firms last week cut the most oil rigs in a week since January as a 14-month drilling recovery stalled due to weak crude prices.
Drillers cut seven oil rigs in the week to Sept. 15, bringing the total count down to 749, the least since June, General Electric Co's Baker Hughes energy services firm said in its closely followed report.
"Prices have now advanced for the last two weeks off increased demand forecasts from both OPEC and the IEA combined with the near-term demand uplift expected as U.S. oil refineries seek to restart operations post-Hurricane Harvey," analysts at Panmure Gordon said.
Oil investors eyed further impact from increasing crude demand from U.S. oil refineries restarting after hurricane outages.
On Wednesday, 13 of 20 affected U.S. refineries were at or near normal operating rates and another five were restarting or ramping up, according to IHS Markit. The largest U.S. refinery, Motiva Enterprises plant in Port Arthur, Texas, was at half its full capacity, the company said Wednesday.
Analysts at HSBC said that despite the U.S. refinery outages, 2017 was set to be an "extremely strong year" for oil demand growth, a key factor underpinning a rise in prices.
"We remain convinced of longer-term upside to crude prices. With the lack of new major project sanctions, we expect conventional non-OPEC supply to start declining post-2018," they said.
They maintained their 2018 and 2019 Brent price assumptions at $65 and $70 a barrel, respectively.
(Additional reporting by Aaron Sheldrick in Tokyo and Karolin Schaps in Amsterdam; Editing by Susan Fenton and Lisa Shumaker)