McGrath Limestone Works operates the quarry, covering some 60 hectares, and employs 55 people directly with an estimated 200 employed indirectly, Oisin Collins BL for the company told the High Court.

Material from the land was used to build the Lough Mask to Lough Corrib canal in the 1840s as a famine relief project though because of its limestone nature, the canal waters are swallowed up in summer leaving it completely dry.

Mr Collins said McGraths had got a number of planning permissions over the years for its excavation activities even though the quarry pre-dated the introduction of planning laws in 1964.

When it became a legal requirement in 2007 that all quarries be registered, Mayo Co Council attached a number of conditions to the McGrath registration which the company did at great expense.

The council also decided an environmental impact assessment (EIA) was not required.

However, under new regulations brought in in 2010 under the Planning and Development (Amendment) Act, local authorities were required to determine whether an EIA or appropriate assessment was to be carried out on quarries in their area.

The council concluded that as the total quarried area after 1990 exceeded five hectares a mandatory EIA was required.

McGrath's applied to An Bord Pleanala to review that decision and last December the board confirmed the council decision.

McGrath's say it is wrong in law and that the reasoning for the decision is irrational.

It has already spent millions of euro complying with conditions imposed on it, it says.

Mr Collins, for McGraths, said the company is effectively being told to stop its operations until it complies with this and this is "potentially ruinous" in circumstances where it is unclear what the basis was for the EIA requirement.

Mr Justice Michael Peart granted Mr Collins, who made the application on a one-side only represented basis, leave to bring judicial review proceedings against the board, the council and the State.