Three weeks ago, China's communist leaders were ranting at U.S. demands to crack down on the production of fake videos and compact discs. They scoffed at threatened trade sanctions and said they didn't really need the United States as a trading partner.

That was then.On Tuesday, communist officials staged a "Protect CD Copyrights" day in the southern province of Guangdong and crushed thousands of pirated discs under a banner that said, "Protect intellectual property - punish piracy."

The sudden turnabout isn't surprising. Neither is the fact that U.S. officials and China hammered out a last-minute accord Sunday that averted an all-out trade war.

As has been stated on this page before, China and the United States need each other. The fledgling Chinese economy hardly could afford to jeopardize a relationship in which it holds a $30 billion trade surplus. In an economic dispute, nothing speaks as loudly as the threat of losing money - or the promise of being allowed into the World Trade Organization.

The Clinton administration understood this, and it should be commended for holding firm on intellectual property rights. As a result, China gave in on virtually all U.S. demands. It abolished barriers that have kept the U.S. music, film and computer industries from entering Chinese markets. It immediately closed seven factories and confiscated 2 million fake CDs and software packages, and it agreed to allow Hollywood a share of box office receipts from China.

Not a bad compromise. It gets even better when one considers the administration, along the way, gained some much-needed credibility in its ability to handle a foreign crisis.

The agreement doesn't end U.S.-Sino tensions. But it does reinforce the America's powerful position in the relationship, both economically and as an influential international player.

That is encouraging as the United States begins to focus on human rights abuses and other vexing Chinese problems.