On Thursday, in the grounds of Granada's Parque de las Ciencias, delighted tourists and students watched a demonstration of olive trees being harvested. Flails whirred in the branches, clouds of olives thudded to the ground on to canvases spread for their collection. It was a timeless image of an industry whose Iberian roots stretch back to the Phoenicians in the sixth century BC, and in which Spain is the undisputed world leader.

Some 40 kilometres further north, however, in the tiny town of Benalua de las Villas, where the real olive harvest is currently taking place, the mood is decidedly less festive. As far back as 2010, local media reports regularly described the industry as going through the toughest time in its 2,500-year history. And this winter in Andalucia, a region that annually produces a third of the world's olive oil, there is no sign of improvement. Already faced with a glut of olives equivalent to 95 million litres of olive oil, this exceptionally dry winter means the industry is braced for its second bumper crop in a row, which could see a further 285 million litres flood an already saturated market.

Factor in a 70 per cent increase in production costs, the stagnation of prices paid to olive oil farmers in the past 15 years, (olive oil retails at over 10 times as much in supermarkets) and a Spanish economy on the rocks, and the result is clear: after years of overproduction, large sectors of the olive oil industry are going to the wall.

Sitting in his office in the San Sebastian harvesting plant in Benalua de las Villas as a line of tractors and trailers wait outside to shed their loads late into Thursday evening, the plant's commercial director, Jose Antonio Caceres Ortega, agrees the industry is facing "a perfect storm". "Over the next five to 10 years, 80 per cent of the small olive oil producers are going to disappear," he estimates. "Either they industrialise their output, or they're not going to make it.

"On top of that, fewer young farmers are taking the place of their parents in the fields. Take a typical family here, with three children: at best, one will remain. The others all leave, studying in a big city somewhere. There's no room for the rest. On top of that, we've got people trying to come back [to rural Spain] from the building industry – which has collapsed – to what they thought was a sure-fire profitable job. But agriculture in its current state isn't profitable."

The olive oil sector is already shrinking fast. In the Andalucian province of Seville alone, where it is reported that 83 of its 105 villages are dependent on it, 6,500 farmers have abandoned the business in the past decade. In Granada, with the country's third highest olive oil output, trade unions estimated last week that since 2000, 75 per cent of the province's farms have drained their savings accounts to zero. "That money they had was the only guarantee that they could go the bank, ask for a loan and be able to continue," according to an official, Nicolas Chica. Without the EU grants, soon to be reviewed, he claims over 70 per cent of Granada's farmers now face ruin.

"Our business is run on a cooperative base with 800 members and we're expecting numbers to drop to 200 in the next five years," Mr Ortega says. "The traditional olive groves will have to change to systems where mechanisation is more easily applicable." In the olive oil business since 1997, when San Sebastian increased its processing capacity sixfold to 30 million kilos of olives a year, Mr Ortega recognises that his trade has partly been hoist with its own petard.

"Each year we've beaten the world record in terms of production, [and] there's too much on offer." This has led major Spanish supermarket chains constantly to use olive oil as a loss-leader, to tempt customers and keep prices low. "At the same time, the big purchasers of olive oil have created a monopoly. During this year's harvest, prices have already fallen by the maximum possible. Buyers exploit the fact the processing plants are full to bursting. So you get bad sales. It's the worst possible facet of the law of supply and demand."

Salvation may be at hand, but it will be extremely painful. Mr Ortega believes that although the olive oil industry is on the point of losing its traditional smallholding sector, mass production could save its future. His company is one of the few processing plants which is already adapting its infrastructure in anticipation. "Agriculture has to change," he predicts, "or it'll go under."