Turkey's Foreign Minister Ahmet Davutoglu and his Armenian counterpart Edward Nalbandian signed the Swiss-mediated deal in Zurich at a meeting attended by US Secretary of State Hillary Clinton, who helped smooth over last-minute disagreements about statements given at the ceremony.
Officials say Clinton and mediators from Switzerland intervened to help broker a solution. The secretary of state, who was en route to the ceremony, had abruptly returned to her hotel just before the scheduled start as problems emerged.
Diplomats said the Armenians were concerned about wording in the Turkish statement that was to be made after the signing ceremony.
"She's involved in working out an agreeable text," a senior US State Department official later said. "She's talking with the Armenian foreign minister, and she had a long talk with the Turkish foreign minister."
The Turkish and Armenian parliaments must now approve the deal in the face of opposition from nationalists on both sides and a Armenian diaspora which insists Turkey acknowledge the killings of up to 1.5 million Armenians as genocide.