Sitting in a parked, black BMW sedan at a hilltop hotel here, with aides thrusting papers at her, Mrs. Clinton worked two cellphones at once as she tried to resolve differences between the Armenian foreign minister, Eduard Nalbandian, and his Turkish counterpart, Ahmet Davutoglu.

Mrs. Clinton continued her efforts inside with Mr. Nalbandian and then gave him a ride to the University of Zurich, where the ceremony was to be held. By her own account, she did most of the talking on the brief trip  appealing to him not to let months of talks go up in smoke.

“There were several times I said to all the parties involved, ‘This is too important, this has to be seen through, we have come too far,’ ” she recalled. Mrs. Clinton declined to describe the differences between the two sides.

Shortly after 8 p.m., three hours late, the two men sat down to sign the agreements, though in a compromise worked out beforehand, neither delivered a statement. The agreement must now be ratified by the Parliaments of both countries, by no means a sure thing.

“We recognize how hard it is, and what courage it takes to move forward in the face of very strong opposition in both countries,” Mrs. Clinton said.