* Six months after deadly attack, expats yet to return
* BP, Statoil say need more assurances on security
* Major projects delayed, Algerian output in decline
By Julia Payne, Lamine Chikhi and Peg Mackey
LONDON/ALGIERS, July 17 (Reuters) - Six months on from a deadly attack at a gas plant in Algeria, oil majors BP and Statoil have yet to send their workers back amid disagreements over security with the government of the North African OPEC producer.
At stake for Algiers is a further decline in oil and gas production, accounting for 60 percent of budget revenues, while the foreign majors want to ensure that the worst ever attack on their facilities will not be repeated.
Immediately after the assault by Islamist militants, Algiers stepped up army patrols around the remote In Amenas plant - run jointly by BP, Statoil and state-owned Sonatrach - and other oil and gas fields.
But BP, one of the largest foreign investors in Algeria, and Statoil want a cast-iron assurance from Algiers that it's safe to send employees back to the facility near the Libyan border.
"The return of Statoil employees is dependent on the necessary security measures being in place," Statoil spokesman Baard Glad Pedersen said.
"We have a good cooperative relationship with the Algerian authorities. They have themselves initiated several changes to the security around our sites. We are in a dialogue with them, together with BP, about how to deepen our discussion."
The siege ended after four days when Algerian forces stormed the plant deep in the Sahara desert. Dozens of foreign workers were killed. At the time, Britain and Japan expressed frustration that the assault on the militants had been ordered without consultation.
BP spokesman Robert Wine said: "We're committed to Algeria, but we need assurance about the security of everyone on site."
Algerian authorities declined to comment officially.
"We believe we have fulfilled all the demands over security and do not understand why BP is still hesitating to come back," said an Algerian official, who asked not to be identified.
Sources close to BP and Statoil say the companies want to make sure the reinforcements are sustained.
"One of the major issues is where the army's decisions are being made - at the defence ministry or at the base camp," one of the sources said.
Another source said: "We want to make sure the higher number of troops are maintained when we go back."
Despite instability across North Africa since the Arab Spring of 2011, the In Amenas attack caught many off guard.
Algiers - Washington's chief ally in countering Islamist militancy in North Africa - was seen fully in control and has beefed up security further against attacks, exacerbated by French military intervention across the border in Mali.
Four BP employees were killed in the siege, and the British government has said it had questions regarding the company's oversight of its staff as the hostage-taking unfolded.
"Much time was spent at the start of the crisis getting BP to confirm which staff were in the country, and which were at the site," a government document seen by Reuters said.
Nick Collier, of the UK Foreign Office's counterterrorism department, told a conference in London in June: "For the first few days, we did not know who was there.
"We built a picture from families calling in," Collier added.
BP says it knew exactly who was on site right from the start of the attack, both its own staff and contractors.
"In a fast-moving incident it takes time to establish clear lines of communications with all the parties involved. This incident was an unprecedented attack," BP's Wine said.
At the time of the siege, BP had about a third of its 60 staff in Algeria at the plant, which usually employs up to 700 people, mostly Algerians. Statoil had 17 employees at the site. The venture also employs dozens of expat subcontractors.
"We need the expats from BP and Statoil to come back soon because we have lost more than 200 jobs," Bachir Benzerga, the union head at In Amenas city, told Reuters.
Some 7,000 Algerians live in In Amenas and rely on the plant for employment. Benzerga said the military was now present 24 hours a day all around the gas facility. Security sources said a small number of expats could return in September but BP and Statoil said no timeframe had been set.
With social spending on the rise, oil output in decline and the price of its natural gas falling, Algeria, Africa's third-biggest oil producer, needs to attract more foreign investment.
The country's gas production has fallen 7 percent to 82 billion cubic meters in 2012 from its peak reached in 2006.
"Concerns over depletion of natural gas reserves have begun to be felt in Algeria ... The long-contemplated export targets of 85 bcm by 2010 and 100 bcm by 2015 have become irrelevant," said Ali Aissaoui from Apicorp consultancy.
Sources close to BP and Statoil say Sonatrach has been fully cooperative on security and related higher costs. A lack of clarity over a broader government and military attitude to security is preventing foreign workers from returning, those sources said.
The removal of expatriate staff has already slowed gas projects at In Amenas and In Salah, which are core to maintaining Algerian gas production as BP and Statoil have delayed at least $1 billion in additional investments.
In Amenas was producing 9 billion cubic metres of gas a year (160,000 barrels of oil equivalent per day), more than a tenth of the country's overall gas output, and is not expected to return to full output before the start of 2014.
"Kit has been bought, but it's just lying around," said the source close to BP. "The people who would have been working on it are out of the country."