Mr Justice Michael Hartmann gives the government six months to rectify the situation

A judge ruled yesterday that covert surveillance operations conducted in Hong Kong have no valid legal basis, but gave the government six months to get its house in order.

Mr Justice Michael Hartmann said the executive order made by Chief Executive Donald Tsang Yam-kuen last year to fill a gap created by two other court rulings is 'an administrative order having no legislative effect'.

He also ruled unconstitutional a law on which authorities have relied for decades to allow phone-tapping.

But he suspended the effect of his rulings for six months, saying the 'legal vacuum' it would create would 'constitute a real threat to the rule of law'.

The judge said Mr Tsang's order was no more than a set of administrative directions given to employees of the government by the head of the government. 'It does not bind Hong Kong residents generally.'

He said Section 33 of the Telecommunications Ordinance, which empowers the chief executive to authorise phone-tapping, was inconsistent with Articles 30 and 39 of the Basic Law, which guarantee the right to free and private communication.

Ruling on a judicial review launched by legislator 'Long Hair' Leung Kwok-hung and fellow activist Koo Sze-yiu, the judge, however, rejected another of their contentions, that Mr Tsang had failed in his duty to bring into effect a phone-tapping law enacted in 1997.

The Interception of Communications Ordinance (ICO) was passed by the Legislative Council three days before the handover and has been described by the Security Bureau as unworkable.

The judge acknowledged that the suspension of his declarations for six months was 'unusual' and 'exceptional', but he had been told it would take that long to enact 'corrective legislation'.

Mr Leung said it was 'unfair and contradictory' to allow a law 'already declared unconstitutional to remain in place'.

'There is a law (the ICO) readily at hand to fill the vacuum, but instead of using it the judge allows the administration to venture into something not yet in existence.'

Mr Leung said there was 'absolutely no certainty' new laws could be in place within six months.

The judge said it was better to withhold a law the government saw as imperfect, to allow time for its amendment, than to force it into practice.

Philip Dykes SC, for the applicants, warned the six-month delay could violate Article 160 of the Basic Law, which prohibits the courts' assumption of any power to declare invalid laws temporarily valid.

But Mr Justice Hartmann was willing to take the risk, as he deemed the danger of leaving no law on the regulation of bugging activities, which could paralyse law enforcement, to be far greater.

'The common law has never been written in stone ... I confirm that I find the inherent jurisdiction of this court to rest not on the doctrine of necessity but, as with the Canadian courts, on the rule of law.'

The executive order, although void of legal effect, could continue to exist as legitimate administrative directions within the government.

The Security Bureau said it would study the ruling and see whether it needed to speed up the process of enacting the new laws.