High-stakes diplomacy is not unlike "Celebrity Poker." In both there is a big stage, a rapt audience and swift reversals of fortune. And in diplomacy as in poker, the best players can sense when their opponents are bluffing, wavering--or holding a winning hand. That certainly seemed to be the game that Wu Dawei, China's chief negotiator, was playing last week during the six-party talks in Beijing over North Korea's nuclear-arms program.

For two years the Americans were thought to control most of the chips. The Chinese hosts often fretted about American intransigence--Washington's blunt willingness to walk away if it did not get what it wanted. But this time a subtle shift in psychology occurred at the table. When Wu presented a draft accord on Sept. 16--the fifth the Chinese team had painstakingly drawn up--the U.S. reaction was typical: we can't accept this. The draft alluded to the delivery of a civilian light-water nuclear reactor as one of the rewards Pyongyang would get if it dismantled its nuclear weapons. For the Americans, such a gift to a rogue tyrant like North Korean leader Kim Jong Il had always been a nonstarter (not least because Bill Clinton had once promised him the same thing). And for Washington, the "sequencing"--when the North might get a nuclear reactor--was far too vague.

But then the Chinese pushed back--and hard. "This is the final draft," Wu told the Americans, according to a senior U.S. official who briefed the media only on condition of anonymity. "Take it or leave it." When the chief U.S. negotiator, Christopher Hill, consulted his superiors back in Washington the next day, they again balked at the draft language. But the Chinese simply reiterated their firm stand, the official said. It was no bluff.

Faced with a Chinese wall, the Americans agonized over a threat that usually doesn't faze them: isolation. The U.S. team realized they no longer had South Korea, once a devoted ally, on their side. In a symbolic move, Seoul's delegates even stayed in a different Beijing hotel than the Americans and Japanese did, and Hill was stunned when South Korea took the Chinese line, officially raising the light-water-reactor issue. Nor could the Americans claim an ally in Russia, which was going its own way here and in nuclear talks with Iran. Only Japan remained loyal. "We said if we reject [the draft], we could find ourselves completely isolated or in a minority," said the U.S. official. "We could get blamed for the talks' breaking down."

After a frenzied weekend of consultations, Secretary of State Condoleezza Rice found a way out. She agreed to accept the draft as long as each party could issue separate statements clearly laying out how they wanted to sequence steps. That way Hill could state unambiguously that the North would have to completely dismantle before the other parties would discuss the reactor "at an appropriate time." Although most details are to be negotiated in November--and North Korean or U.S. second thoughts could upset a deal--President George W. Bush signed off on the tentative pact.

Hailed as a "wonderful" breakthrough by Bush, the North Korean nuclear agreement was also evidence of a perceptible shift in power balances, both in Asia and around the world. For the first time, America hewed to the Chinese line, not the other way around. China, once a timid and indecisive giant--the Baby Huey of nations--was at last asserting itself like a great power. And the Bush administration, weakened by Iraq, hurricane damage (both real and political) and plummeting poll numbers, was more willing to compromise. "The Chinese understand they hold more cards here," says Jonathan Pollack of the U.S. Naval War College. "America is a little distracted these days and China knows that."

Beijing has been exploiting its power advantage in other ways. The People's Liberation Army is building up parts of its military capability faster than Washington expected--especially its rapidly expanding fleet of submarines and naval vessels. And it has pointedly kept Washington from participating in the inaugural East Asia Summit--where officials will discuss an Asian regional trading bloc--being held in Malaysia in December. "China made clear it didn't want the U.S. invited, and it discouraged Japan's efforts to let Washington in as an observer," said an Asian diplomat who would speak only if he were not further identified. In response, Deputy Secretary of State Robert Zoellick last week warned Beijing not to seek "to maneuver toward a predominance of power" in the region.

China's growing sway at the bargaining table extends beyond Asia, and Washington finds itself in the uncomfortable position of having to work harder to influence nations than it once did. That was the case last week in Vienna, when the United States and its European partners had to lobby intensively for a resolution at the board of governors of the International Atomic Energy Agency to refer Iran's nuclear program to the U.N. Security Council. China, a board member, decided to abstain along with Russia. But a whole new round of globo-poker will be played out at the Security Council, where Beijing bears a critical veto.

Beijing's new assertiveness is also a reflection of its own fears. America is still the lone superpower, while China remains a developing country. Washington, aware that some of its old allies aren't as chummy, is trolling for new partners on China's borders. When Indian Prime Minister Manmohan Singh visited Washington in July, he was treated to a state dinner in celebration of his new strategic alliance with America. Chinese President Hu Jintao, meanwhile, was penciled in for lunch (it was postponed by Hurricane Katrina).

Of course, there's a big difference between poker and diplomacy. Among nations, everybody around the table can win. If North Korea does de-nuclearize, it will go down as a triumph of Chinese mediation. But America will come out ahead, too.