A pilots' union has warned that a bid by Scotland's senior law officer to gain access to black box data from a crashed helicopter would have "an adverse impact on future investigations into civil aviation accidents, incidents and occurrences in general".

The Lord Advocate, Frank Mulholland QC, has gone to the Court of Session in Edinburgh seeking disclosure of the information from a Super Puma flight that crashed in the North Sea two years ago claiming the lives of four offshore workers.

But the move is opposed by the British Airline Pilots' Association (BALPA) in a unique hearing in the Scottish courts.

The helicopter, which had 18 people on board, crashed about two miles west of Sumburgh airport as it flew into Shetland from the Borgsten Dolphin platform about 240 miles east of Aberdeen.

Sarah Darnley, 45, from Elgin, Gary McCrossan, 59, from Inverness, Duncan Munro, 46, from Bishop Auckland, Co Durham, and George Allison, 57, from Winchester, died.

The Air Accidents Invetigation Branch (AAIB) of the Department of Transport recovered the cockpit voice recorder (CVR) and flight data recorder (FDR) information but has refused to make the material available without a court order.

Police have been attempting to get an expert opinion on the manner of flying of the helicopter but the procurator fiscal has been told that for it to be of value the expert must have information, including the CVR and FDR.

BALPA claim that any benefit arising from granting such an order is outweighed by the adverse domestic and international impact such action may have on the investigation into the crash or any future safety investigation.

Andrew Brown QC, for the Lord Advocate, said the court was required to carry out a balancing into the competing interests.

Mr Brown told Lord Jones that the Crown was keen to discover, if possible, the most accurate evidence available in relation to the circumstances of the crash of the helicopter.

The Lord Advocate maintains that given the serious consequences of the crash a thorough and effective investigation by the procurator fiscal and police is in the public interest.

It is said: "The disclosure of the requested material is essential for such a thorough and effective investigation."

BALPA claims that the high importance of the public interest in maintaining confidence of all those involved in the aviation industry requires full and accurate reporting to and cooperation with the relevant regimes.

It said: "It is essential that the crew of aircraft involved in accidents and incidents have the confidence to provide information during and after accidents and incidents without having concerns that information they provide will be used against them in a criminal investigation."

"The disclosure of the cockpit voice recordings and flight data sought.......would have an adverse impact on future investigations into civil aviation accidents, incidents and occurrences in gneral," it is said.

Aidan O'Neill QC, for the union and helicopter pilots, said: "The investigation of the fatal accident is not being impeded by waiting for AAIB reports."

Mr O'Neill said there was "no suggestion or hint that a crime has been committed here".

The hearing continues.