* Foreign funds remain net buyers in Egypt
* Dubai, Qatar top two performers, following global shares
* Saudi ends slightly up as oil breaks above 2016 peak
* Q4 may be better for Saudi banks than regional peers
* Banks buoy Abu Dhabi
By Celine Aswad
DUBAI, Jan 3 (Reuters) - Stock markets in the Middle East gained on Tuesday, with those most exposed to international funds outperforming as global equities and crude oil prices firmed on their first full-scale trading day of 2017.
Cairo's main index closed 1.1 percent higher with gainers outnumbering losers 25 to two. Foreign traders were net buyers, exchange data showed, a trend which has been consistent since the float of the Egyptian pound two months ago.
Telecommunications firms performed well with Global Telecom jumping 5.8 percent and Telecom Egypt adding 3.8 percent.
Qatar's main index climbed 1.6 percent with Commercial Bank, the top performer, adding 3.5 percent. Some investors tend to rotate into Qatari stocks in the early part of the year to capture high annual dividend yields.
Dubai's index finished 1.8 percent higher with most trade focused on small and mid-sized shares. Builder Drake & Scull, the most heavily traded stock, jumped 4.6 percent.
Emaar Properties, a favourite of foreign funds, rose 2.9 percent.
The positive mood spilled into neighbouring Abu Dhabi, where the index rose 1.2 percent in modest trading volume. Union National Bank rose 4.7 percent and Abu Dhabi Commercial Bank climbed 4.4 percent.
"We expect to see a lot of speculative trade around banks that may announce merger plans in 2017," said a Dubai-based analyst.
Last November UNB and ADCB denied media reports that they were considering a merger, but analysts continue to believe a tie-up is possible. Earlier in 2016, First Gulf Bank and National Bank of Abu Dhabi said they would merge in the first quarter of this year.
In Saudi Arabia, the index traded lower for most of the session but closed 0.1 percent higher with buying momentum building in the final hour of trade as Brent oil climbed to an 18-month high of $58.37 a barrel.
Petrochemical shares were mixed with Saudi Basic Industries adding 0.8 percent but Yanbu National Petrochemicals falling 0.9 percent. The insurance sector, a favourite of local short-term speculators, gained 1.5 percent.
In 2016 regional banks had a tough year as net income was hit by difficulty obtaining deposits in an environment of low oil prices, rising bad loan provisions and a struggling construction sector. But the last quarter of 2016 could show small improvements in some banks' earnings, especially Saudi ones.
"In the fourth quarter of 2016 declining interbank rates will stabilise funding costs and support Saudi bank net interest margins (NIM), in contrast to United Arab Emirates banks which are likely to witness NIM pressure on rising competition. We expect to see provisioning charges continue to rise for Qatari banks, from their construction sector exposure," said SICO Bahrain.
Saudi heavyweight Al Rajhi Bank, which closed flat on Tuesday, is expected to witness year-on-year earnings growth of 3.8 percent for the fourth quarter, said analysts at Aljazira Capital; QNB Financial estimated a rise of 14.8 percent.
* The index edged up 0.1 percent to 7,251 points.
* The index rose 1.8 percent to 3,602 points.
* The index climbed 1.2 percent to 4,590 points.
* The index added 1.6 percent to 10,600 points.
* The index gained 1.1 percent to 12,425 points.
* The index was flat at 5,775 points.
* The index rose 0.6 percent to 5,733 points.
* The index lost 0.7 percent to 1,211 points.
Editing by Andrew Torchia and John Stonestreet