North Sea oil and gas could produce £20 billion less in revenue than originally forecast over the next three decades, according to the Office for Budget Responsibility (OBR).

Chairman Robert Chote revealed the independent scrutiny body is now forecasting revenues of £61.6 billion would be raised between 2013/14 and 2040/41 - down from £82.2 billion.

If production levels are low, oil and gas receipts could be only £40 billion for the period 2018/19 to 2040/41, the latest Fiscal Sustainability Report (FSR) said.

But with higher production levels and oil prices, these could be as high as £81.5 billion, according to the report.

The OBR's latest central projection for oil revenues over this period is now £55.6 billion.

Scottish First Minister Alex Salmond dismissed the figures as "stuff and nonsense".

But Mr Chote told SNP MSP Kenneth Gibson, the convener of Holyrood's Finance Committee: "Taking the March medium-term forecast and today's long-term projections together, we have reduced our central projection for total oil and gas receipts between 2013/14 and 2040/41 by £20.6 billion since last year's FSR, from £82.2 billion to £61.6 billion."

Better Together, which is urging Scots to reject independence and vote to stay in the UK in September's independence referendum, claimed the figures mean a separate Scotland would have a £12 billion financial "black hole" in its first three years.

Campaign leader and former chancellor Alistair Darling said: "Today's figures confirm what we already know - the oil is running out and the tax we will get from it is falling. Being part of the UK means we can make the most of what is left in the North Sea without putting the funding for our schools and hospitals at risk. It's the best of both worlds for Scotland."

But the Scottish Government said the OBR forecasts are based on a "very low estimate of future total production".

It has already published higher forecasts for oil and gas income, saying this could be between £2.9 billion and £7.8 billion in 2016/17 - the first year of an independent Scotland if there is a Yes vote in September.

Scottish Finance Secretary John Swinney said then that the central prediction showed the country can benefit from £34.3 billion over the next five years - equal to almost £7 billion a year.

In his letter to Mr Gibson, the OBR chairman said that "North Sea production has now been falling consistently since 1999, by an average of 7.8% a year".

Mr Chote added: "Our projections suggest that North Sea oil and gas receipts will remain a valuable fiscal resource for many years to come. But they are highly volatile from year to year, which makes near-term forecasting very difficult.

"And while it is clear that the long-term trend in receipts is downward, the pace of that decline - and the amount that can be collected as it happens - is highly uncertain and very sensitive to the path of production and prices. Whichever government receives these receipts needs to plan on that basis."

The OBR report said "total UK oil and gas production has fallen every year since 1999, with particularly steep falls of 19% and 14% in 2011 and 2012 respectively".

It added: "Oil and gas receipts are the most volatile revenue stream in the UK public finances and forecasting them over even very short horizons is fraught with difficulty. Our short-term forecasts over the last three years have tended to be too high, mostly as production has fallen short of expectations.

"Over the longer term, we can be more confident that oil and gas receipts are on a declining trend as total production from the UK continental shelf moves towards its ultimately recoverable capacity."

Mr Darling said: "Oil and gas has been great for Scotland. The industry employs around 200,000 people here and generates billions in tax to pay for our public services. That's a good thing, but the tax we get is volatile and declining.

"Alex Salmond has consistently over-estimated how much tax we would get from the North Sea, and today's figures confirm that his future guesses are as unreliable and optimistic as ever."

Mr Salmond told the BBC: "The OBR are suggesting 10 billion barrels of oil and gas remaining. Oil and Gas UK say up to 24 billion barrels. The professor of geology at Aberdeen University says it's more like over 30 billion barrels.

"Now, all of these people know infinitely more about the extent of the reserves remaining in the North Sea than the Office of Budget Responsibility in London does. I think they should start talking to the experts."

A spokesman for Scottish Energy Minister Fergus Ewing said: "North Sea oil is a bonus, not the basis of an independent Scotland's economy, and is a fantastic asset which will be around for many decades to come. But in an independent Scotland that oil wealth will be properly invested, not squandered as it has been by successive Westminster governments.

"The OBR's forecasts rest on estimates of future production which are well below that used by the industry, by leading experts and by the UK Government themselves.

"By the Treasury's bizarre logic, Norway wouldn't be able to sustain its own oil industry - the reality is that Norway has the biggest oil savings fund in the world, now worth more than £500 billion."

A UK Treasury spokesman said the North Sea is "one of the UK's great national assets", but added: "It is becoming harder and more expensive to extract North Sea oil and gas, which is reflected in the OBR's decision to revise down expected tax receipts from oil and gas by 25%, or almost £21 billion, compared to last year.

"The broad and diverse UK tax base means we are able to support the oil and gas industry, for example through targeted tax reliefs for oil and gas fields that are technically or commercially challenging. A separate Scotland would be more reliant on income from the North Sea so is unlikely to be able to provide the same level of support, which comes at a cost in the short term, and would therefore miss out on the long-term economic potential it has to offer."

Scottish Conservative energy spokesman Murdo Fraser said the OBR projections "once again highlight the folly of basing your entire economy on the fluctuating price of oil".

He said: "It shows that over the next 25 years, oil revenues are going to drop substantially. No matter how many different ways the SNP try to twist the figures, the stark reality is there would be less tax from oil to help fund public services under independence.

"Alex Salmond has to be straight with people on how he would make up this multibillion-pound shortfall to pay for our schools and hospitals. The truth is that either taxes would need to go up, or services cut.

"By remaining part of the UK, Scotland can continue to benefit from the North Sea without putting at risk the key public services we rely so heavily on."

Liberal Democrat peer Lord Purvis said: "What these figures underline is the folly of basing your entire economic policy on a volatile and declining resource. The gap between the oil and gas assumptions upon which the SNP based the White Paper and the independent assessment of the OBR is now wider than it has ever been.

"There is now a near-universal view from experts that an independent Scotland would have to raise taxes or cut spending further than the rest of the UK to pay for the SNP's plans. These new projections are another hammer blow to the Nationalists' economic credibility.

"It is time we saw a little honesty from the Yes camp about what their plans would mean for spending on key public services."

SNP MSP Jamie Hepburn said the OBR report had been released "just days" after former Scottish Enterprise chair Professor Sir Donald MacKay had "savaged" figures it had produced previously.

Mr Hepburn said: "Despite Professor MacKay's 40 years of expertise, it seems the OBR is simply ignoring his evidence and the expectations of the oil and gas sector itself.

"We have seen record investment in the North Sea in recent years entirely because companies are determined to boost production.

"And as the recent Wood Review proposals earlier this year made clear, we have the opportunity to enhance the economic value of our oil & gas industry by £200 billion over the next 20 years.

"Coming alongside the report by the Expert Commission on Oil and Gas which shows that through consultation, a commitment to certainty for the industry and an oil tax regime that supports both the industry and public revenues there is huge potential in the North Sea for years to come.

"With a Yes vote in September we will be able to ensure that the sector benefits from a more stable taxation regime instead of being subject to surprise Treasury tax grabs - maximising the jobs that the industry creates and ensuring that Scotland's resources are used to the full benefit of people in Scotland."