* Saudi, UAE, Bahraini banks pulling out deposits
* Pace of July outflows similar to June's
* Qatar mobilises sovereign wealth fund to offset this
* Deposits $17.8 billion in two months, data suggests
* Qatari banks cutting overseas exposure, domestic growing (Adds details, analysis)
By Andrew Torchia
DUBAI, Aug 22 (Reuters) - Qatar's government deposited nearly $7 billion in the local banking system during July to offset a pull-out of funds by banks from other Arab states due to the region's diplomatic crisis, Qatari central bank data showed on Tuesday.
Foreign customers' deposits at banks in Qatar - the vast majority in the form of foreign-currency deposits - shrank to 157.2 billion riyals ($43.2 billion) last month from 170.6 billion riyals in June. The rate of decline was roughly the same as in June, when the crisis began.
But total deposits at banks in Qatar rose during July, to 772.5 billion riyals from 770.7 billion riyals, because of a $6.9 billion jump in the Qatari public sector's foreign currency deposits, the data showed. That followed a $10.9 billion injection by the government in June.
Saudi Arabia, the United Arab Emirates, Bahrain and Egypt cut diplomatic and transport ties with Qatar on June 5, accusing it of backing terrorism, which Doha denies.
Banks and other institutions from the four countries quickly began pulling deposits from Qatar - a threat to the stability of the banking system, which has relied heavily on foreign money to fuel its rapid growth in the last few years.
Doha responded by having its sovereign wealth fund, the Qatar Investment Authority (QIA), deposit fresh funds in its banks - a strategy which seems to be working as interbank money rates, which jumped half a percentage point in the initial weeks of the crisis, have now stabilised.
Fund outflows could continue into next year as Arab banks pull out maturing time deposits, bankers believe. Fifty-five percent of cross-border deposits in Qatar's banks last year were from other nations in the Gulf Cooperation Council.
This implies around 50 billion riyals of remaining Saudi, UAE and Bahraini deposits may flow out in coming months, in addition to a smaller amount of cross-border loans; Qatari banks have been borrowing more from Europe than from the GCC.
Qatar looks likely to be able to cope with such outflows. The QIA's liquid assets are estimated at around $180 billion or more, and its banks can replace some of the lost money with deposits or loans from Asia - a big consumer of Qatar's natural gas exports - and Turkey, a diplomatic ally.
Nevertheless, the crisis appears to be causing Qatari banks to rein in their business abroad. Their claims on banks outside the country shrank to 83.9 billion riyals in July from 93.8 billion riyals in June and 102.2 billion riyals in May.
A unit of Qatar's Doha Bank is seeking to sell some of its assets in the UAE, banking sources told Reuters in early August, a sign that Qatari lenders are reducing exposure to the Gulf's main financial centre because of the political uncertainty.
So far, however, Qatari banks do not appear to be cutting their domestic business. Total domestic credit facilities extended by the banks rose to 795.8 billion riyals last month from 779.7 billion riyals. (Reporting by Andrew Torchia, editing by David Evans)