Image copyright Getty Images Image caption All smiles: OPEC ministers after reaching agreement at the meeting in Algiers

Opec, the oil producers' group is back in the driving seat.

Well perhaps it is. It certainly took the commodities markets (and me) rather by surprise when it agreed to cut production at a meeting in Algiers.

In fact the group has a lot of work to do before it has a real and sustained impact on the price.

But that decision was not what the market expected. Traders thought the result would be more disarray, as there was at a meeting of Opec and some other oil exporters in Doha back in April.

Economic pressure

This time they did manage to make progress.

The context for the Algiers decision - and the unsuccessful attempts to agree action before - is crude oil prices are less than half what they were in June 2014.

That hurts Opec member countries.

Government finances and economic performance have taken a substantial hit.

In Saudi Arabia for example, the government's finances were in surplus to the tune of 12% of annual income (GDP) in 2012. Last year there was a deficit of 16%.

Angola's economy grew 7% in 2013. Last year it was 3%.

Venezuela's figures are much worse, though it's far from being entirely due to the lower price of oil. That has however severely aggravated the economic damage done by the country's political crisis.

Opec member countries have felt this financial pain with increasing intensity for almost two years now.

Opec doesn't account for the whole market by a long way. There are very large oil producers that are not members, notably the United States, Russia, China and Canada. But the group, which currently has about 40% of the global market can move it by cutting production - and it does have a history of responding to low oil prices, by cutting production.

The Iran factor

In the past Saudi Arabia, the group's biggest player, has often led the effort.

This time the situation was complicated by Iran's emergence earlier this year from international sanctions over its nuclear programme. Tehran was determined to take advantage and sought to recover its share of the market.

For Opec, the trouble was that Saudi Arabia was unwilling to curb production without Iran doing likewise, a position also underpinned by the longstanding geopolitical tension between the two countries which are the leading powers in the Gulf.

That tension was the reason for the failure in Doha in April.

Things seem to have changed. Iran has boosted oil production already. It could go higher, but not as easily as was the case in the immediate aftermath of the lifting of sanctions. Saudi Arabia has softened its position.

Image copyright Getty Images Image caption Saudi energy minister Khalid al-Falih. The Kingdom appears to have softened its position since Doha.

The oil minister Khalid al-Falih, who was appointed after the Doha meeting, is reported to have said in Algiers that Iran, as well Nigeria and Libya would be allowed to produce "at maximum levels that make sense".

The secretary general of the group, Mohammad Sanusi Barkindo, told the BBC that those three countries "have lost a considerable volume of their production due to unfortunate circumstances". He said "they will be treated differently."

Shale oil competitors

It also appeared to be the case for some time after the price fall began in 2014 that Saudi Arabia was willing to tolerate the situation because of the pressure it put on competitors, especially shale oil producers in the United States.

The rise of this sector over the last decade or so is seen as a key factor behind the plentiful supply of oil that partly drove the price fall.

Some shale operators have cut back, but overall oil production in the US in 2015 was higher despite the lower prices. If the Saudi aim was to squeeze the American industry, they have not had anything like the success they hoped for.

Image copyright David McNew Image caption Oil production in North America rose in 2015 overall, despite lower prices, thwarting Saudi hopes

It does look as though the Saudis have decided they need a new strategy.

So Opec agrees they want to take action to push prices up. The detail will be difficult to negotiate.

How will they allocate the production cuts between members? How differently will Iran, Nigeria and Libya be treated? And what baseline level of production will they use in calculating new production ceilings?

It's also likely they will want some non-members to co-operate. The US and Canada won't. They don't believe in the kind of market management that Opec is trying to achieve and in any case oil production is done in those countries by private businesses which will not take orders from energy ministers.

Russia, however, might be willing to come on board and did discuss the possibility at the Doha meeting.

And then with Opec there is always the question of whether member countries will comply with any agreed limits on their own production.

The reaction of the oil market to the Algiers agreement is telling. The price of crude oil rose and then fell back. It remains very much within the range that it has been trading in for the last six months. In short it looks like the market view is that something has changed at Opec, but traders will need to see Opec filling in all the details of an agreement before they are convinced that prices really are heading upwards.