ON THE evening of May 19, 1988, an unprecedented banquet was taking place in a Shanghai restaurant. It was a routine haunt of the city's deputy police chief, Yuan Yougen, and Public Security Bureau colleagues. But with them was a far from routine set of VIP guests; a top US prosecutor from San Francisco and two Drug Enforcement Agency officials. The two sides had informally agreed to make law enforcement history - China would, for the first time, allow a confessed heroin trafficker to travel to the US to give key evidence against his suspected kingpin. DEA agent Thomas Aiu, summed up the positive ambience of that evening's dinner. Bringing the witness Wang Zongxiao to San Francisco could not fail to reap dividends, he said. It was a ''win-win situation''. More than five years later, Mr Aiu's words have come back to haunt everyone at that table. The Wang saga, known to its long-suffering protagonists as the ''Goldfish case'', promised to mark a new era of Sino-US narcotics co-operation. Instead, it degenerated into legal chaos and mutual suspicion, climaxing last week with a crushing courtroom defeat for the US Attorney's office when a judge launched a scathing attack on its treatment of Wang. Assistant US attorney Eric Swenson, who had made it his mission to nail the Goldfish case drug runners, now awaits a decision on his future, after Judge William Orrick described the operation he led as showing ''such clear, flagrant and shameful violations of Wang's rights under the Constitution that they shook the conscience of the Court''. The ruling, in a civil case brought by Wang against the US authorities, has lifted the lid on an inept and at times underhand operation that has critically damaged the credibility of Mr Swenson's department and the immigration services, and left the DEA and its former allies in China barely on speaking terms. Mr Swenson, the judge said, withheld vital evidence from the defendants' lawyers, lied to the court, and never warned his Chinese counterparts that bringing Wang to the US was fraught with legal and political obstacles. It now transpires that Mr Swenson had been told by the Hong Kong police in the bluntest of terms more than five years ago that a prosecution based on Wang's testimony was destined to fail. Had he listened, Wang would have been spared his long ordeal, andthe Sino-US drugs fight might still be on its feet. As it is, Wang - spared deportation to possible execution in China under Judge Orrick's order - is nevertheless still sitting in the detention centre that has been his home for three years. By an ironic twist, the accomplices he had been brought over to testify against have already served their time and are free men. Wang, 35, has been in captivity since 2 pm on March 12, 1988, when police picked him up on the streets of Shanghai. He knew what they'd come for; his part in a conspiracy to smuggle heroin into the US concealed in the bodies of goldfish. But he wasn't prepared for what was to come; weeks of interrogation, during which he was deprived of sleep, tortured with cattle prods and urged into confessing and incriminating his colleagues. The man the Chinese really wanted to nail was Hong Kong man Leung Tak-lun, 41, whom they suspected to be the ringleader, and who was in custody in the territory following the joint China, Hong Kong and US sting. At first, Wang told interrogators he did not remember Leung being at a meeting in the Oriental Hotel in Guangzhou, where $460,000 exchanged hands for seven blocks of heroin. But days later, Wang had changed his mind, mysteriously signing a statement claiming Leung was indeed present. After listening to evidence at the recent trial, Judge Orrick had no difficulty in deciding why: it was beaten out of him. While Wang was experiencing the warmth of PSB hospitality in Shanghai, Mr Swenson, Mr Aiu and colleagues were also discussing how they could prosecute Leung. They had been told by Hong Kong police Inspector Sandy Boucher the territory did not have enoughevidence to go on for a prosecution there. Neither did Hong Kong wish to risk sending Leung to face possible execution under Chinese law. But Inspector Boucher did provide the DEA with minutes of Wang's questioning that he had obtained from the Chinese. When he read them, Mr Aiu's keen eye immediately spotted something strange. He noticed how on March 14, Wang had denied having met Leung in Guangzhou, but on March 19, had changed his story and implicated Leung. From his experience on Chinese matters, he suspected Wang had been coerced into it by his interrogators - and he told as much to Mr Swenson. (The latter told a US court later he had never discussed with any colleague the possibility that Wang might have been mistreated - one of the many ''contradictions'' that Judge Orrick came to deplore.) Meanwhile, the DEA's man in Hong Kong, James Harris, was shown a videotape of one of Wang's interrogations by Inspector Boucher, who had long since washed his hands of the Goldfish case. Mr Harris noticed Wang was at the left side of the screen, partially out of frame, and that he appeared to be under restraint by an officer, who had both hands on Wang's left side. But by now, the Americans had decided to push for Wang's transportation to the US to give evidence against Leung, whom they would seek to extradite from Hong Kong. Mr Swenson and Mr Aiu flew via Hong Kong to Shanghai in May, where they questioned Wang. In the presence of Yuan and other officials, Wang told them through an interpreter that he would be willing to testify in the US. Then the deal was more or less sealed around the banquet table on that historic evening. But in all the times the US officers met their Chinese counterparts, they did not once raise the subject of how Wang had been handled during questioning, despite their suspicions. In his three days on the witness stand, Mr Swenson testified that to do so would have been ''insulting'' and risked souring the goodwill essential in securing Wang from the Chinese. Soon after agreement was reached came the first inkling the Chinese had little idea what they were getting into. They asked the Americans for a reciprocal arrangement, meaning the same procedure might take place in reverse if China ever needed a witness in future. After a flurry of internal memos, the US Embassy in Beijing politely told the Chinese Government that was not practical. Although Chinese law allowed for witnesses to be forced to travel abroad to give evidence, the US legal system would never support it, they said. Unless a potential witness consented to travel to the PRC, the US Government could never force him. Then came a fatal mis-step which Judge Orrick was also to attack later. It was not lost on the Americans that Wang might take the disastrous step of claiming asylum once he got to the US. Should they tell the Chinese? They didn't. The reason was spelt out in a memo from the embassy to the DEA in San Francisco: ''If we express our concern that the witness' return to China could be delayed by asylum requests, we believe the Chinese might decide against sending them. We therefore do not intend to raise this issue with the Ministry of Public Security at present.'' In later contacts with Wang and Chinese officials, Mr Swenson did warn them of one thing: that defence lawyers would inevitably subject Wang to the kind of cross-examination one does not see in China. They would also try to discredit him as a witness. Mr Swenson met Inspector Boucher in Hong Kong again on March 9, 1989. He later testified that Inspector Boucher gave him a set of memoranda belonging to the Attorney-General's department. He wasn't really supposed to do that, confided the Hong Kong policeman, but he thought he would want to see them. What Mr Swenson had been covertly handed was the bluntest hint yet that the Wang case was fraught with danger. One of them was a memo from Crown Counsel R.B. McNair, advising the then deputy Crown Prosecutor Jim Chandler not to proceed against Leung in Hong Kong. It read: ''It seems to me . . . that the likelihood of conviction is small. I am unaware of the methods or circumstances surrounding the taking of [Wang's] confessions, however, a videotape has been supplied by Inspector Boucher, who tells me that a mostpeculiar posture was adopted by Wang throughout the confession, whereby the whole of his left side and left arm was hidden from the camera, as if his left arm and side may have suffered some injury.'' Mr Swenson was also handed a memo written by Mr Chandler, apparently to Director of Public Prosecutions, Jim Findlay, which said the fact that Wang ''is an uncorroborated accomplice who would be testifying as a result of the greatest possible inducement would almost certainly lead to an acquittal. Indeed it would be unsafe to mount a prosecution based upon his evidence''. The memo concludes: ''If the US authorities wish to pursue their own approach, that is a matter for them.'' Mr Swenson gratefully took the documents and read them on the flight home, the court later heard. What he did later has cast a heavy cloud over his reputation. Even though the memos clearly should have been made available to the defence counsel, Mr Swenson kept them buried in his files and did not inform Mr Aiu or his colleagues of their existence. Nor did he mention the existence of Inspector Boucher's videotape. He later told Judge Orrick he did not produce the memos because Inspector Boucher had given them to him in confidence, and they did not contain information he considered important to the defence - both explanations found by the judge to ''be wanting''. In any case, the Goldfish operation survived the tremors of Tiananmen Square, despite State Department concerns that it should not proceed. Wang finally flew to the US in December 1989, checked into the Pleasanton detention centre and the trial began in January 1990, with Mr Yuan there to make sure Wang gave the agreed testimony. It is possible that, in 1988, the US Embassy in Beijing decided against warning China about a potential asylum claim because diplomats gambled that Wang would not dare. If so, it was a disastrous bet. Almost immediately on taking the stand, Wang asked tosee the judge privately and requested his own lawyer. During a recess, the panic-stricken US and Chinese teams confronted Wang, Mr Swenson telling him: ''You don't need a lawyer because I am your lawyer,'' and a furious Mr Yuan berating him in Shanghainese. Once Wang got back to China, he warned: ''Your life is in our hands.'' But Wang had already determined that he wasn't going back. He claimed asylum, the trial collapsed, the Chinese officials left, and what ensued was a three-year fight by immigration officials to have Wang returned home. The DEA had always claimed that unless Wang returned, the Chinese would refuse to co-operate on further narcotics matters. For his part, Wang insisted - and Judge Orrick supported the claim - that he faced torture and possible execution if he were to be deported. The INS denied his asylum claim and made him the subject of an exclusion order. But even that department has not been spared the microscope. The judge found that the INS had devoted extraordinary efforts in pursuing the case, and had even manipulated thecourt timetables in a bid to have Wang's case heard before a judge it considered to be most likely to rule in its favour and deport him. That fate, for the time being at least, is spared the hapless Wang. Judge Orrick granted him a permanent injunction against being deported from the US - a decision he conceded was ''extraordinary in scope and effect''. ''In this case, however, this injunction is the only adequate relief to cure the flagrant violations of Wang's rights,'' he said. Having concluded that Wang's evidence against Leung was indeed beaten out of him - a conclusion the US prosecutors chose to ignore - the judge said Wang had been left with Hobson's choice: either lie to the US court, or tell the truth and risk the firingsquad back home. Mr Swenson was guilty of ''tunnel vision'' in pursuing the case to Wang's detriment, he said, and he accused US officials of creating ''a tissue of outrageous lies''. Wang may have been spared the bullet back home for now, but his future is still far from certain. His request for a writ of habeas corpus failed, so he languishes behind bars while the wheels of justice grind on. The US Attorney's office, smarting from the battering of Judge Orrick's ruling, will only say that it has 60 days to appeal, and is considering doing so. As for any potential action against Mr Swenson or colleagues, said assistant attorney Pat Bupara, that was a matter that had been passed to the Justice Department in Washington. INS district director Dave Illchert declined to comment. Wang's lawyer Cedric Chao, said it was ironic that his client was not a free man, while Leung and two others, who ended up pleading guilty to minor drug-related charges, have been released. He welcomed the judge's injunction against deportation, but saidhe was still fighting to have him freed from custody. He would not give details. Meanwhile Wang, a small-time narcotics felon, remains one of the biggest diplomatic thorns in America's side. The Goldfish case has been a nightmare for all those involved - China, the US, and the little guy sandwiched in-between. To paraphrase DEA agent Thomas Aiu, it was a win-win situation in which everyone lost.