The High Court in Auckland is to determine what should happen to evidence seized in the raid, after a ruling found the search warrants were illegal.
The officer who led the investigation detective inspector Grant Wormald was cross-examined all day.
Kim Dotcom's lawyer, Paul Davison QC, labelled the investigation a disgrace and suggested to Mr Wormald that it brought New Zealand police into disrepute.
Mr Davison said the police special tactics group used inappropriate and unnecessary force, smashing through doors and pointing guns at people, including the children's nannies.
But Mr Wormald said Mr Dotcom had access to firearms and police needed to be prepared for any threat.
MegaUpload was indicted in a federal court in Virginia, USA, on 19 January this year and the site was shut down. Mr Dotcom and three co-accused were arrested in Auckland, New Zealand, the following day.
Formal papers requesting their extradition were lodged by the United States in early March. An extradition hearing is scheduled for next year.
The four-day hearing concluded on Friday.
Both sides are going to give written closing submissions to the judge to consider before a ruling is given.