The High Court has been told New Zealand can't have a hermetically sealed border and it's impossible to block every potential biosecurity risk.
Murray Sherwin, former head of the Ministry for Primary Industries (MPI), was giving evidence in a case brought by kiwifruit growers seeking compensation over the vine-killing disease PSA.
The growers argue MPI failed to protect them from known biosecurity risks by allowing disease to slip into the country.
The bacterial disease is estimated to have cost the industry close to $900 million when it hit in 2010 and the growers say the Crown must bear the cost of failing to meet its duty of care to them.
Mr Sherwin told the High Court in Wellington on Tuesday that when he took up the director-generalship of the ministry in 2001 work had just begun to develop a biosecurity strategy for New Zealand.
He said there was dissatisfaction with the way biosecurity was being handled, along with a perception that more complex risks were arising.
But this country could not run a hermetically sealed border, he said.
It would be impossible to identify and block every potential risk and the resource required to do so would be "immense and counter-productive".
"For a nation dependent on trade like New Zealand, it would place an impossible burden on the border."
Mr Sherwin said even if it was possible to block diseases at the border, they could still come here in the air or on ocean tides.
Budgets were strictly accounted for in terms of the quality of work the ministry was doing and there were strong constraints on chief executives exceeding their budgets.
"Over-spends, unauthorised appropriations are to be avoided and in the event they do occur the ministry and its chief executive can expect to come under close scrutiny from the Treasury, the Minister and the State Services Commission."
Crown lawyer Jack Hodder QC completed his opening address on Tuesday, telling the court the statutory framework put the legal responsibility relating to biosecurity risks at a higher level than that of the impact on individual kiwifruit growers, as has been suggested in this case.
"It is important to bear in mind the full scope of the duty would necessarily apply in all cases of goods coming over the border, not just in respect of the one consignment focused on by the plaintiffs.
"The result if the plaintiffs were successful would be that the Crown would act as the insurer in the event a biosecurity incursion could be found to be the result of of some error or insufficient effort on the part of a government official involved in biosecurity."
Mr Hodder said the scale of the potential liability for the Crown if that was upheld would be immense.
He said MPI was an entity with a limited budget and it would be out of all proportion to try and put those requirements on it.