Energy company Metgasco has succeeded in having suspension of a major gas drilling project at Bentley on the NSW north coast overturned in the Supreme Court, paving the way for a compensation claim against the state government.

In a judgment on Friday morning, Justice Richard Button ruled an order to suspend drilling by the NSW Office of Coal Seam Gas in May last year was "unlawful" as was a follow-up "confirmation" of the decision after a review requested by Metgasco.

Protesters against the Bentley gas drilling project.

He said the suspension notification letter from the Office of Coal Seam Gas to Metgasco came "like a bolt from the blue" despite legislation requiring the company be given a reasonable chance to respond before it was implemented.

The decision to suspend the licence saw Metgasco's share price plummet by 40 per cent.