The Government's bill to legalise covert state video surveillance is more than just the balancing act between civil liberties and police powers to investigate crime.
It is also about police reputation, good constitutional practice and the law-making powers of Parliament and the Supreme Court.
In a decision known as Hamed, the Supreme Court on September 2 found that covert video surveillance on private property was illegal, even under a search warrant.
Crown Law advice is that all trespassory video surveillance is illegal, and "over the fence" surveillance (filming from a public place, or from private land with the owner's consent) is likely to be illegal too.
Police immediately turned off the video cameras in 13 current operations, and have held off starting 15 operations.
Forty-seven pending trials involving 229 suspects involve evidence gathered by hidden cameras, and these have all been put on hold.
The Security Intelligence Service, Customs and Fisheries are also affected.
Police and the Government say if the law is not changed, there is a serious threat to public safety and suspected criminals might get off the hook.
They also maintain that even though there was no lawful authority for such surveillance, common law established in the Court of Appeal had previously deemed it not unlawful, and therefore lawful.
In a decision last year, the Appeal Court ruled that "the concept of 'search' is broad enough to include the installation of unmanned video cameras to record what occurred inside the property".
"It is difficult to see any sensible reason why covert surveillance of the type at issue should not be permitted under a warrant if other surveillance alternatives are not practicable," the judgment said.
The Law Society has challenged this by saying the law before Hamed was that the legality of covert video surveillance depended on each case.
At stake here is the reputation of police.
"The deliberate unlawfulness of the police conduct in the covert filming ... is destructive of an effective and credible system of justice," wrote Chief Justice Dame Sian Elias.
However, she acknowledged that police had acted in good faith, because they did not hide their intention to undertake covert video surveillance in the warrant application.
The Government has taken a similar line to police in effectively saying that they, and previous governments, considered such surveillance to be lawful.
Blame has been laid at the feet of Parliament because it has known since a Law Commission report in 2007 that there was a gap in the law.
The Search and Surveillance Bill, which fills this gap, was reported back from a select committee last November but has been languishing on the order paper since.
Former Prime Minister Sir Geoffrey Palmer said this "parliamentary negligence" was the main reason the Government was trying to ram through a law change in the last days of the term.
The justice and electoral committee has this week heard submissions on the Government's solution to reinstate the status quo before Hamed.
The Video Camera Surveillance (Temporary Measures) Bill would make it explicitly lawful for government agencies to use covert video surveillance under a warrant for private property.
The bill would have retrospective effect, ensuring that previous video footage could be used as evidence and that previous convictions that relied on video evidence were not open to appeal.
The bill would be in place for one year, which should be enough time to debate and pass the Search and Surveillance Bill, though the committee is considering shortening this to six months.
Covert video surveillance:
There is broad consensus that some government agencies need the ability to use hidden cameras, but disagreement about how much power to give them.
Under the bill, police could use hidden cameras on private property if they secured a warrant under the Summary Proceedings Act, which is limited to investigating crimes punishable by a jail term. A warrant is issued by the District Court, but not necessarily a judge.
Over the fence surveillance would not need a warrant. Such surveillance would still be subject to the Bill of Rights protection against unreasonable search and seizure.
Almost all submitters argued that this was insufficient protection, including the Law Commission, the Law Society, the Bar Association, the Criminal Bar Association, the Privacy Commission and the Human Rights Commission.
An alternative that several submitters preferred was to take the relevant provisions from the Search and Surveillance Bill, which has greater restrictions.
* A warrant can be issued to investigate offences punishable by at least seven years' jail, and firearms offences.
* Without a warrant in emergency circumstances: a threshold of at least 14 years' jail and for no more than 48 hours.
* Over the fence: No warrant but restricted to three hours in any 24-hour period and eight hours in total.
The Government has rejected this, arguing that it would be too complex a task in the time available and may have unforseen consequences because of the scope of the bill. This has been challenged by, among others, Sir Geoffrey Palmer.
Other submitters called for more judicial oversight, such as the regime for private communications interception warrants issued under the Crimes Act.
* Signed off by a High Court Judge: For investigating offences related to an organised criminal group, including serious violent crimes and offences punishable by at least four years' jail.
It was pointed out to the committee that it would be an anomaly to be able to have video surveillance signed off by a low-level clerk in a District Court, when a bugging device had to be approved by a High Court judge.
Police Commissioner Peter Marshall did not express a view on what the regime should be. He only asked that the law be clear.
Submitters also argued that the powers should not be available to all state agencies.
Should the bill be retrospective?
There are two issues here: evidence already gathered for pending trials, and evidence used to convict defendants who might, in light of Hamed, have grounds for appeal.
All legal experts before the committee argued against retrospectivity on the grounds it was constitutionally objectionable and against Rule of Law principles.
"Some people may be deprived of a defence as a result of this legislation," Sir Geoffrey said.
It is also likely that past convictions relied on more than just video evidence.
The Evidence Act has also been cited as a safety net.
Section 30 gives a judge discretion to allow evidence, even if it is improperly obtained, to be admitted in court. The judge must weight up factors including:
* How the evidence was gathered, including how intrusive it was, and whether it was done deliberately, recklessly or in bad faith.
* The seriousness of the alleged offence.
* Whether there were other ways to gather the evidence.
The Government argues that Section 30 is a grey area and a retrospective bill would give certainty that past evidence was legal.
The select committee will report back on Monday, but it remains to be seen if the Government has the numbers to pass it under urgency on Thursday.
The Labour, Green, Maori and Mana Parties oppose it in its current form, and Act MPs - who vote individually - have reservations. With only United Future supporting, the Government needs three more votes.