Australia has withdrawn a contingent of police officers from Papua New Guinea after judges there found the deployment was unconstitutional. Around 200 Australian police officers and bureaucrats were sent to Papua New Guinea last year as part of a multi-million dollar program to help restore law and order and combat corruption.

The deployment of Australian police officers to Papua New Guinea was part of an ambitious five-year plan to combat spiraling crime and corruption.

Six months after their assignment began, they are now heading home.

At the end of last week, Papua New Guinea's Supreme Court decided that parts of the Australian mission, in particular the visitors' immunity from prosecution, violated local laws.

The government in Canberra had demanded these legal exemptions before it agreed to send in its police officers last year.

Attempts to revive the agreement will have to negotiate the very sensitive issue of immunity.

Talks between the two governments are expected to start soon and there is guarded optimism among the Australian police officers that they will soon be back in Papua New Guinea - or PNG - to carry on where they left off.

Speaking in the PNG capital, Port Moresby, Australian police chief Barry Turner said he is sad to be leaving. "It has been without a doubt - the last couple of days - a roller coaster ride of emotion, disappointment. It is hard to walk away - even temporarily," he said.

The presence of Australian personnel has sparked some tensions. Dozens of PNG police officers attended a rally earlier this month calling on them to leave, insisting there had been no real improvements in law and order.

The Supreme Court ruling is a blow to Canberra's policy of greater intervention in the affairs of its smaller neighbors in the South Pacific. The government here was worried that instability in the region could create havens for drug traffickers, money launderers and extremists.

In 2003 Australia led a multinational peacekeeping force into the troubled Solomon Islands, which had suffered years of ethnic unrest. The security situation there has improved significantly.

Papua New Guinea - a former Australian colony that gained independence in 1975 - faces even more serious law and order problems as well as corruption.

Port Moresby is considered to be one of the most dangerous cities anywhere. The country of six million people also has the highest rates of HIV and AIDS in the South Pacific.