THROUGH THE last week, senior U.S. and Chinese officials have intensively engaged with each other in Beijing along two parallel fronts. A Strategic and Economic Dialogue, involving months of preparation and hundreds of participants on both sides, concluded with some modest agreements on opening China’s securities markets and liberalizing U.S. export controls. But far more important were the ad hoc and tension-filled negotiations about the fate of Chen Guangcheng, the activist given refuge in the U.S. Embassy days before the arrival of the U.S. delegation.

On that second front, Secretary of State Hillary Rodham Clinton and her staff tried and ultimately failed to achieve a breakthrough in China’s treatment of its dissidents. But their fallback deal with Chinese authorities on Mr. Chen’s departure with his family to the United States will protect Mr. Chen and U.S. honor, assuming he actually is allowed to travel soon. The diplomacy, meanwhile, proved two crucial points: The United States has the capacity to influence Beijing’s human rights behavior, and aggressively pressing that agenda won’t necessarily damage cooperation on other bilateral issues.

The administration took plenty of heat for the handling of Mr. Chen, including a hyperbolic statement from Mitt Romney on Thursday. Though U.S. treatment of the blind, injured and fugitive activist was not flawless, the attacks were misguided. Prompted by Mr. Chen, U.S. diplomats managed to win Beijing’s agreement to an unprecedented deal that would have allowed him to move to the city of Tianjin with his family and to enroll at a university.

The bargain fell apart not because of U.S. bungling or even Chinese backtracking but largely because Mr. Chen changed his mind once he left the embassy. His lawyer and other supporters told him his scheme was unworkable. While they may be right, it’s unfortunate that the authorities’ promises, which could have set a precedent for the treatment of dissidents, were never put to the test.

Ms. Clinton’s apparent rescue Friday of what was beginning to look like a diplomatic fiasco was due partly to her willingness to raise the Chen case directly with the senior Chinese officials she met with as part of the official dialogue. But it was also revealing about the desire of top Chinese officials to maintain smooth relations with the United States during a year in which a U.S. presidential election and a Chinese leadership transition coincide. The Beijing leadership group clearly does not wish U.S.-China relations to become a U.S. campaign issue or to further roil what already appears to be a bumpy transition between President Hu Jintao and heir apparent Xi Jinping.

The administration could be charged with rushing Mr. Chen toward a settlement to avoid disrupting the “strategic dialogue.” But the dialogue also provided leverage to obtain Chinese concessions that normally might have been slow in coming — if they came at all. It will be important that the administration keep pushing if, as seems probable, Mr. Chen seeks to return to China after spending time in the United States, in order to establish the principle that human rights activists can work within the law without persecution. As Ms. Clinton herself put it Friday: “This is not just about well-known activists. It’s about the human rights and aspirations of more than a billion people here in China . . . and it’s about the future of this great nation.”