Yip was captured in 1985, but he escaped from prison four years later by feigning a stomachache. In 1996, a police rookie shot three bullets into his spine, paralyzing him. Two years later, after a sensational trial, Yip was given a sentence of 40 years, the longest in Hong Kong history. Now he sits behind the razor-wire-topped walls of maximum-security Stanley Prison. He’s lost 40 pounds from intestinal problems. Warders refuse to help him at night. So when his bladder or bowels give way, he must lie in misery in his cell until morning, when a guard comes to clean him up. “He expects to die in prison,” says his lawyer.

Yip is one of the last survivors of a loosely knit, roving band of gunslingers and gangsters that terrorized Hong Kong for decades–and seemed to relish taunting the hapless police. But the police are having the last word. Since his incarceration, Yip has watched helplessly as Hong Kong and Chinese police have joined forces to track down and arrest his cronies, many of whom have been executed on the mainland. Petty criminal offenses–organized by gangs called triads–are on the rise on both sides of the China-Hong Kong border. But high-profile crimes are on the decline–and so are the brazen gangsters who commit them. Major robberies in Hong Kong are down 20 percent this year, and kidnappings have fallen significantly. “Beijing wants to preserve Hong Kong for capitalist investors, and big investors need to feel safe,” says James To, a former chairman of Hong Kong’s Legislative Security Panel. “It’s only major crimes that threaten their peace of mind.”

Until the Hong Kong handover, the border with mainland China provided a convenient escape hatch for criminals. Hit men would slip into Macau or Hong Kong, do their dirty work, then slip out. Hong Kong police were not allowed across the border. And asking for assistance from their mainland counterparts was futile–requests were typically ignored by an indifferent police bureaucracy. The gangs took full advantage. Yip and his cohorts cultivated an extensive network of loyalties in Guangdong province. But then they got too greedy. Between 1996 and 1997, Yip’s gang kidnapped the sons of two of Hong Kong’s most powerful tycoons, fled to southern China and demanded kingly ransoms. That crime was a turning point. Chinese leaders were deeply alarmed about the image of their new territory. Many security officials in Guangdong, which still accounts for 10 percent of China’s crime, were sacked–and Beijing vowed not to play criminal host any longer. “In the past, when gangsters like these got across the border, they were home and away,” says a former senior Hong Kong police officer. “It’s not that way anymore.”

Guangdong and Hong Kong now share the same goal–locking up criminal kingpins. They conduct regular joint police training exercises–and more important, share intelligence. In the first six months of this year, the Guangdong Public Security Department asked the Hong Kong police force for assistance in 158 cases. Hong Kong asked for help in 249. “[Cross-border] liaison used to be perfunctory, but we are now in a working mode,” says Hong Kong police Chief Superintendent Andy Tsang. To buttress his point, he holds up a thick pink folder of priority cases facing police in Guangdong, Hong Kong and Macau. It was compiled last month during a first-of-its-kind law-enforcement conclave for the three law-enforcement organizations. Senior officers from Hong Kong and Guangdong now visit each other frequently to exchange ideas, talk shop or sometimes just to socialize.

The cooperation is paying off. By working together, police are cracking major cases that would have been nearly impossible to solve a few years ago. A Hong Kong-owned ship, the Cheng Son, was seized by pirates off the coast of southern China in November 1998. In the subsequent investigation and trial, Hong Kong police provided the mainland with information about vast money-laundering operations and bogus companies run by the pirates. Thirteen of the pirates were executed by the mainland earlier this year. In April of last year, the son of a wealthy Hong Kong businessman was kidnapped by a distant relative who fled to Macau and Guangdong. Police from Hong Kong and Guangdong teamed up to track him down. The two sides pooled their expertise last February to bust a cross-border loan-shark syndicate that had amassed $2.5 million by intimidating more than 2,000 people in Hong Kong.

The most dramatic breakthrough came in 1998 when Cheung Tse-keung, a criminal colleague of Yip’s, was nabbed. The baby-faced, smooth-talking Cheung was known as Big Spender. He owned a dozen sports cars, including a trademark banana yellow Lamborghini. He was considered the mastermind behind the gang. His “arrogance,” says Zheng Shaodong, deputy director general of the Guangdong Public Security Department, made him a target of the crackdown. Cheung reportedly visited the home of tycoon Li Ka-shing to demand ransom for Li’s son, whom the gang had reportedly kidnapped in 1996. “His goal was to hold people in such a state of terror,” says Zheng, “that all he had to do was to threaten you over the phone and you would pay him money.”

Under pressure from Beijing, Guangdong mounted a huge manhunt for Cheung after learning he had crossed over from Hong Kong. Hundreds of police were mobilized–and after two weeks, he was captured. What’s more, mainland police rounded up more than 30 other members of his gang, even pursuing two to Thailand. But then came a complication: the mainland refused to return Cheung to Hong Kong, asserting that because Cheung “plotted” his crimes in Guangdong, he was eligible to be tried and punished there. (Local newspapers reported that the tycoons had asked Beijing to get rid of Big Spender because Hong Kong does not impose capital punishment.) Hong Kong Democrats and legal scholars disagreed. They argued that Cheung should be returned to Hong Kong for trial, because that’s where his crimes were committed. The mainlanders prevailed–and on Dec. 5, 1998, Cheung was executed, along with many of his accomplices. “All the lone gangsters are out of the scene now,” says Tsang. “The Big Spender case has had the effect of scaring everyone else.”

That’s not to say the joint operation is a seamless success. Neither side has had time to develop a legal framework to match their new spirit of cooperation. Hong Kong is busily drafting a treaty to govern the transfer of prisoners. But as evidenced by the Cheung case, the work is tangled sometimes by the mainland’s harsher punishments–and by Hong Kong’s tricky one-country, two-systems relationship with the motherland. Hong Kong law prohibits extraditing a prisoner to a country where he could face the death penalty. For that reason, Hong Kong currently does not send any fugitives to the mainland. Meanwhile, mainland China is still struggling to adopt conventional rules of law, and so its decisions tend to be inconsistent. One Hong Kong kidnapper who recently used Guangdong as a base to negotiate ransom was, unlike Big Spender, sent back to the island for trial.“There’s no legal basis for transferring people,” says Albert Ho, a human-rights lawyer, “so they just make an administrative decision.”

That kind of leeway worries Lu Siqing, a 35-year-old human-rights activist who lives in Hong Kong. Under a subversion clause now being drafted for Hong Kong’s Basic Law, Lu, who was born in Hunan, could conceivably face deportation to China for his work. He runs a hot line for human-rights abuses on the mainland, and says his cause has been jeopardized by the sharing of intelligence between police forces. Mainland security officers arrested a Chinese dissident last May shortly after he had called Lu at home. Since the dissident used a public phone, which would not have been tapped, Lu asserts the call was monitored in Hong Kong. “Under the British, they might listen to your phone calls, but they would never give [information] to China,” Lu says. “Now they can use this to harm dissidents in China.” The Hong Kong government denies tapping Lu’s phone, and says it provides intelligence to mainland police only if there is suspicion of an offense.

Over the last 25 years, Hong Kong has done much to clean up its police force. Corruption is no longer a problem. But the same cannot be said of China’s police. They are known to accept bribes–and some work in cahoots with the gangsters they’re supposed to be arresting. “Hong Kong people are not afraid of Hong Kong police,” says one Hong Kong policewoman, “but mainlanders are afraid of their police because they have to pay money to get them to do things.” Superintendent Tsang says increased interaction between the two sides ought to solve the problem–forcing the mainland’s corruption issue into the open.

China aims to professionalize its police ranks–and the country is getting tough on those who accept bribes. The head of national security, Jia Chunwang, is a stern spycatcher with no connections to shady businessmen. Last week, a top government leader, Cheng Kejie, was executed for corruption. As if aspiring to a new, more professional image, Guangdong recently built a shiny, glass 33-story tower for its Public Security Department. Last year the department established the first advanced DNA-testing lab in the country; it’s on a par with Hong Kong’s. “There is no hitting people anymore; we have gotten rid of that,” says Zhang Xiaojue, the first female city police chief in Guangdong. “Now our biggest guideline is that everything must be done according to the law.”

Both sides are having less success against street crime. Some of its growth feeds off changes in the Hong Kong economy. As increasing numbers of tourists and teenagers travel across the border to the vast urban sprawl of Shenzhen, nightclubs, bars and brothels run by secret, underground triads (different in nature from Yip’s gang of brazen gunslingers) have proliferated. In Hong Kong, rising unemployment among teenagers has spurred many to sell drugs or pirated CDs for triads. In the first half of this year, petty robberies increased by 30 percent, and taxi robberies by 64 percent.

Like everywhere else, Chinese police have priorities–and brutal crimes top the list. In April of last year, a Hong Kong construction worker, Wu Wai-fung, lured the 13-year-old son of a wealthy relative from school. Wu brutally murdered the boy, hid the corpse, then fled to Zhuhai, a city in Guangdong, where he began making ransom demands to the family. Hong Kong police provided photos and intelligence that helped mainland police track Wu down. They sent two officers to accompany the surveillance team. Mainland police made sure that photographs and other evidence for the trial were gathered only by the Hong Kong officers–as stipulated by Hong Kong law. Last month Wu was sentenced in Hong Kong to life in prison. In April, Hong Kong provided information enabling the Guangdong police to make nine arrests at a promotion ceremony for officeholders in the Sun Yee On triad in Shenzhen. “Long-term cooperation with the mainland,” says Tsang, the police chief, “ensures the stability of Hong Kong.”

Just ask Yip Kai-foon. When he first arrived at Stanley Prison, officials were unnerved by his reputation. Afraid that mercenaries might try to rescue him, they reportedly constructed barricades to prevent helicopter landings on the prison grounds. But Yip’s gangster days are long gone. Now he spends his energy making appeals, on humanitarian grounds, to the Hong Kong judiciary. Even if he were somehow to escape, he knows there is no longer any place to hide. “We were playing a game with the mainland,” he says, “but they changed the rules.” That’s what police must do, sometimes, to win the war on crime.