It's always nice to start a new job with a trick up your sleeve, and the Middle East's new envoy Tony Blair could be forgiven for thinking he has just that. In the near future, a $4bn deal to exploit Gaza's offshore gas reserves will be signed by the Israeli government, Britain's BG Group (BG), the Palestinian Authority (PA)'s investment arm, the Palestine Investment Fund (PIF) and Consolidated Contractors Company (CCC). Environmental considerations notwithstanding, an injection of this kind of capital into the occupied territories could transform the political landscape.

By fortune or design, Tony Blair has been crucial to the deal's genesis. But the pressure he has put on other parties to agree a deal that economically ties the PA to Israel has exacerbated Fatah-Hamas tensions, put the PIF on the political defensive, and may even have helped stoke the recent fighting in Gaza.

It was the Gaza-Jericho first agreement in 1994 that first allocated the PA a 20-mile maritime zone off Gaza's coast. But it was not until 1999, the year that BG gained its exploration concession on the field, that Israel agreed to "give" it to the PA. In exchange, the PA signed away "full security control" of the sea off Gaza to Israel. They probably thought they had got a bargain.

The Gaza maritime field is estimated to contain between 35-40bn cubic metres - or one trillion cubic feet - of gas. In the words of the British Foreign Office, it is "by far the most valuable Palestinian natural resource" and revenues from its output are usually estimated at $4bn. For this reason, Ariel Sharon always opposed its development, claiming that monies raised might be used to arm Israel's enemies.

In the summer of 2005, when Sharon was focused on "disengagement" from Gaza, BG signed a memorandum with the Egyptian company EGAS to sell the gas there. However, the deal was scuppered a year later, when Tony Blair intervened at the last minute to plead the Israeli government's case to BG, allegedly following a request from Ehud Olmert.

The PIF maintains that the deal was a purely commercial enterprise. But one informed source told me it was also a "highly political" venture in which Britain's relationship with Israel had been "key". "The UK and US, who are the major players in this deal, see it as a possible tool to improve relations between the PA and Israel," he said. "It is part of the bargaining baggage."

If the benefits of the deal to Tony Blair's future career and BG's public image would have been clear in 2006, the advantages to Israel were clearer still. As well as diversifying the country's energy supplies, the project could provide up to 10% of the country's energy needs, at around half the price the same gas would cost from Egypt. One well-placed Palestinian source told me there was "an obvious linkage" between the BG-Israel deal and attempts to bolster the Olmert-Abbas political process.

But it is not clear yet how much (if any) of the gas will be used within the occupied territories, and many Palestinians would have preferred a business partner they didn't fear might withhold revenues as a collective punishment. Critically, the absence of figures on how much EGAS was offering for Gaza's gas in 2005 has fed speculation that Blair intervened to prop up a weaker Israeli bid.

Some reports suggest that up to three-quarters of the $4bn of revenue raised might not even end up in Palestinian hands at all. While the PIF officially disputes the percentages, it will provide no others for fear of a public backlash. In fairness, they may still be the subject of negotiation.

But the final destination of whatever revenues the Palestinians get is also still foggy. Behind the scenes, a battle is developing with Palestinian modernisers, who are lobbying for the money to go into a "development pot" earmarked for infrastructure projects. For now, the US and UK's preferred option of an international bank account over which Abbas would hold sway, appears more likely. There is a long tradition of such bank accounts in the PA. They have not been a vote-winner for Fatah.

Ever sensitive to popular anger at the exploitation of Palestine's national treasure, one of Hamas's first demands after seizing power in Gaza was for a renegotiation of the BG contract.

Ziad Thatha, the Hamas economic minister, had previously denounced the deal as "an act of theft" and modern-day Balfour Declaration, that "sells Palestinian gas to the Zionist occupation". His rhetoric might have been a response to the circumvention of the Gaza Strip in the deal, which will pipe gas directly onshore to Ashkelon in Israel. But it could also have reflected the fact that Hamas had been cut out of the deal, while one of its most deadly rivals might have been cut in.

On April 29, two weeks before fighting flared in Gaza, Yossi Maiman, co-owner of the rival Israeli gas company EMG, claimed that in 2004, while he was in talks to join the project, it was revealed to him that shares in it were being held in trust for two confidential partners: Mohammed Rashid and Martin Schlaff. BG denied the claims but they were damaging.

Schlaff is a millionaire who was investigated on charges of attempting to bribe Ariel Sharon in 2006. Mohammed Rashid is a former director general of the PIF and erstwhile "mentor" and ally to the now-exiled Gazan warlord Mohammed Dahlan. Conflicts Forum website described Rashid as a sometime advisor to the US and "an essential part of America's programme to undermine Hamas".

A note of caution is necessary here. Yossi Maiman is reportedly a former employee of the Mossad. So is Shabtai Shavit, the CEO of his company who was condemned by Israel's attorney general in 2004 for using his intelligence connections to advance EMG's interests in the Gaza gas fields. Debkafile, a website associated with Israeli spooks has also previously used Rashid's alleged involvement in the BG deal as an excuse to lobby against it. Among Israel's securocrats, the Sharonist position of 2003 (equating Fatah with Hamas with terrorism) may still be a weighty one.

But just because one wing of Israel's security establishment seems paranoid, does not mean another is not out to get Hamas. It would have been understandable if the group's leadership had seen the monies raised by the BG deal as a long-term threat to the balance of power in Gaza, irrespective of Rashid's alleged involvement. The fact that the PIF's chief executive, Muhammad Mustafa, is also Abbas's economic advisor alone would have raised questions for Hamas about the final destination of gas revenues.

Critics of Ariel Sharon's disengagement policy used to point out that in the absence of economic sources of power in Gaza - and border closures ensured that none could develop - influence would inevitably flow from the barrel of militia guns. The BG deal had the power to change all that. Muhammad Mustafa called it a "paradigm shift".

But a combination of factors - the obsession among Israeli and western leaders with controlling the Palestinian's use of their revenues, the deal's alleged terms, the uncertainty surrounding its beneficiaries, the secrecy with which the whole shebang was negotiated and, critically, the choice of Israel rather than Egypt as a buyer - instead just stirred an already simmering pot.

If Tony Blair were serious about redeeming his reputation in the Middle East, he could start by bringing Hamas into the deal's framework, while insisting that its revenues be administered by an accountable but non-aligned committee for the benefit of the Palestinian people as a whole. He could advise BG to make good on their threats to reopen negotiations with Egypt if Israeli hardball games continue around the talks.

He could publicly say that more free lunches for the unaccountable title holders of international bank accounts and British mega-corporations will set back the cause of peace - between Israel and Palestine as well as between Fatah and Hamas. He could do all of this and more. Or he could sit back and let suspicions continue that the wrong people might just end up laughing all the way to the bank with the proceeds of Gaza's gas.