Most Middle Eastern stock markets ended lower on Thursday, amid falling oil prices, though the Qatari index bucked the trend on the back of gains for its banking shares.

Brent crude futures erased Wednesday's gains, falling 6.1%, or $2.53, to $39.20 a barrel by 1246 GMT, hit by a record build-up in U.S. crude inventories and the U.S. Federal Reserve's projections that the world's biggest economy would shrink 6.5% this year. 

Saudi Arabia's benchmark index slipped 0.3%, with National Commercial Bank losing 1.5% and Samba Financial Group shedding 2.2%.

But oil giant Saudi Aramco, which raised gasoline prices for June, edged up 0.2%.

In Dubai, the index dropped 1%, pressured by a 1.6% fall in Emirates NBD Bank, and a 4.6% slide in Dubai Investments as the stock traded ex-dividend.

The Abu Dhabi index eased 0.8%, with the United Arab Emirates' largest lender, First Abu Dhabi Bank, falling 2.4%.

The UAE economy is likely to contract by 3.6% this year after economic activity slowed because of the coronavirus outbreak, the central bank said on Wednesday. 

In Qatar, the index gained 0.5%, helped by a 3.5% rise in Qatar Islamic Bank and a 0.6% increase in Qatar National Bank.

The Gulf state will start lifting restrictions imposed to curb the spread of the coronavirus under a four-phase plan starting on June 15. 

Outside the Gulf, Egypt's blue-chip index decreased 0.9%, extending losses from the previous session. Egypt Kuwait Holding retreated 3.4% and Commercial International Bank was down 0.4%.

(Reporting by Ateeq Shariff in Bengaluru; Editing by Alex Richardson) ((AteeqUr.Shariff@thomsonreuters.com; +918061822788;))