Friends of Bill Clinton can and do say this for him: He is always there when he needs you.

Whether seeking a campaign contribution, praise and sympathy for the hard road he has traveled or a boost for his place in history, Clinton is unmatched in the political art of identifying your ability to contribute to his destiny.

Lust for foreign policy legacy chafes in Clinton's heart as his final year in power approaches. He traveled to Oslo this month to engineer an end to 2000 years of Arab-Israeli enmity for his presidential sunset. He will stop off in Kosovo on this month's European trip to stand as liberator of the Balkans. In Italy he will propound a Third Way political philosophy for the ages.

The sunset syndrome makes the final year of any presidency a most dangerous year in foreign affairs. Lame-duck presidents and their aides tend to conceptualize the world as they want it remembered under their dominion rather than as it is. Their personal investments in history summon up trips, speeches and policy adjustments infected with shared illusions rather than unpleasant reality.

This danger is compounded by the arrival of the next presidential race. U.S. politics do not end at the water's edge in the electronic era: The rest of the world listens in real time to the candidates' promises and threats. Last week China's sudden and aggressive bristling over Republicans and Democrats debating a national missile shield underlined global interconnectedness in politics.

That reaction on missile defense also demonstrated that China represents the greatest danger of illusion overwhelming reality in this particular sunset. There has been a significant change in Beijing over the past 18 months that has gone largely unreflected in a U.S. policy that still aims at creating a lasting image of Clinton's engagement with Beijing having changed the world for the better.

Things are much worse: China's generals and hard-line politicians have dropped the pretense of working toward strategic partnership with the United States. They now openly show their determination to become a strategic rival--and a perceived nuclear threat--to Americans in the shortest possible time.

This dramatic change follows a series of setbacks that have made Beijing's rulers feel encircled and less secure. These include India's nuclear tests last year, the May 7 U.S. bombing of the Chinese Embassy in Belgrade and Taiwan's increased public candor about maintaining control over its national destiny.

On the surface President Jiang Zemin continues to pursue two policy tracks: He lets economic reformers expand commercial engagement with the West on terms favorable to China, while the military undertakes a rapid buildup of its forces to counter both U.S. hegemony in East Asia and Taiwan's assertiveness.

The hard-line military track has overtaken the economic track in priority and in setting the tone of Beijing-Washington relations--for China.

U.S. analysts in Washington and a Third World statesman who recently visited China have told me the same thing in the past few weeks: They are struck by the openness with which Chinese politicians and generals now write and speak on Beijing's willingness to use military power against the United States if or when necessary.

A Russian analyst says that Moscow is full of Chinese arms purchasers combing the crumbling Russian defense industry for solid fuel for intercontinental missiles and anything else they can buy. Recent disclosures of a Chinese deal with Israel and Russia for a sophisticated long-range airborne radar system lend credibility to these reports.

So does the determined effort of the Chinese military to reverse-engineer any and all bits of Western technology that it can acquire. The Chinese informed Undersecretary of State Thomas Pickering on his fence-mending trip to Beijing last summer that one of the five bombs the U.S. Air Force dropped on their embassy had not exploded and was in their possession.

They turned a deaf ear to Pickering's offer of U.S. help to recover the bomb. Western analysts suspect it had already been packed off to Beijing to be picked apart and rebuilt, as was at least one unexploded U.S. cruise missile fired into Afghanistan last year.

The crucial agenda between China and the United States now is not about human rights or commercial engagement. It is about strategic rivalry. China did not respond to the U.S. proposal to reengage in a formal dialogue on nonproliferation carried to Beijing two weeks ago by Pickering, and turned down a similar approach by French diplomats.

The Clintonian response is to continue to center ties on commercial negotiations, good wishes and meaningless palaver designed to enhance the sunset's aura. Proposed visits to Beijing by Deputy Secretary of State Strobe Talbott, senior U.S. military officials and at least one Cabinet official to smooth things over one last time are almost certain to do more harm than good. The Chinese understand Clinton's needs and the way to exploit them all too well.

U.S.-Chinese relations are in flux and on a downward path. This need not be fatal to a mutually respectful relationship that minimizes the chances of conflict, which should be the U.S. goal. But achieving that goal requires Clinton to put reality before legacy, national interests before vanity. This is when history needs him, not vice versa.