* Saudi petrochemicals lead gains
* U.S. Congress vote on suing Saudi has little impact
* But some analysts see long-term problem
* UAE markets follow global bourses higher
* Egypt's Orascom Construction rises on buy-back price
By Celine Aswad and Andrew Torchia
DUBAI, Sept 29 (Reuters) - Saudi Arabia's stock market rebounded on Thursday on the back of petrochemical shares, which rallied in response to OPEC's deal to restrain oil output, but the bourse posted a big weekly loss because of government austerity measures.
Petrochemical firms, their profit margins closely tied to oil prices, recovered after Brent oil surged above $48 a barrel overnight on the OPEC deal in Algeria. The largest petrochemical producer, Saudi Basic Industries, gained 3.5 percent.
This encouraged buying back of a range of stocks and the insurance sub-index, which had seen many of its constituents drop their 10 percent daily limits in recent days, rebounded 2.4 percent. BUPA Arabia, the largest medical insurance provider, jumped 4.1 percent.
The overall Saudi market index closed 1.6 percent higher but it was down 5.5 percent for the week, hit by Monday's announcement of cuts to civil service bonuses and allowances as the government grapples with a huge budget deficit.
"The stock market was dragged down by a wave of heavy selling, taking many shares to multi-year lows, so technically it was oversold," said Mohammad Al-Shammasi, chief investment officer of Riyadh-based Derayah Financial.
A monthly Reuters poll, published on Thursday, found Middle East fund managers had become negative on balance towards Saudi Arabian equities for the next three months because of the austerity policies.
There appeared to be little impact on the market from news that the U.S. Congress overwhelmingly rejected President Barack Obama's veto of legislation allowing relatives of victims of the Sept. 11 attacks to sue Saudi Arabia. Any lawsuits could take years to wind their way through U.S. courts, with uncertain prospects for success.
Nevertheless, the Saudi riyal fell moderately in the foreign exchange forwards market and credit default swap prices edged up. Some analysts said the legislation could become a significant problem for Riyadh in the long term.
"Investor sentiment is likely to be impacted as this opens the door to uncertainties in U.S.-Saudi relations that cannot be resolved at the executive arm of the government," said Raza Agha, chief Middle East economist at VTB Capital.
"Previous issues always had the potential to be resolved through diplomacy - this now means there are potential legal challenges ahead for Saudi Arabia, which the White House and Riyadh cannot address via talks."
Other Gulf markets followed global shares higher in the wake of the OPEC deal. Dubai's stock index closed 0.6 percent higher with DXB Entertainments, formerly known as Dubai Parks and Resorts, adding 0.6 percent and Emaar Properties gaining 1.4 percent.
The two largest listed shares in Abu Dhabi helped carry the index up 0.6 percent; First Gulf Bank rose 0.9 percent and Etisalat added 0.8 percent.
In Qatar, the main index ended 0.3 percent lower as Qatar National Bank, which had led advances in the first hour of trade, slipped 0.1 percent. But the index rose 0.6 percent over the week.
Egypt's main index fell 0.3 percent as a little over half of traded shares declined. Private equity firm Qalaa Holding dropped 4.6 percent and the largest listed bank, Commercial International Bank. lost 1.7 percent.
But Orascom Construction climbed 1.1 percent to 71.05 Egyptian pounds after the company set the price for its buy-back of 1 million Cairo-listed shares at 74.05 pounds.
* The index gained 1.6 percent to 5,623 points.
* The index rose 0.6 percent to 3,474 points.
* The index climbed 0.6 percent to 4,476 points.
* The index edged down 0.3 percent to 7,881 points.
* The index fell 0.3 percent to 10,435 points.
* The index rose 0.7 percent to 1,150 points.
* The index slipped 0.1 percent to 5,398 points.
* The index was flat at 5,726 points.
Editing by Alison Williams