ANKARA (AFP/Reuters) - Turkeys Prime Minister Recep Tayyip Erdogan cast doubt Sunday on landmark deals signed with Armenia to end decades of hostility, seeming to pose conditions on the opening of their common border. Erdogans comments came less than a day after top US and European officials, including US Secretary of State Hillary Clinton, engaged in frenetic diplomacy to help Armenia and Turkey overcome last-minute differences. The two countries eventually signed historic pacts to normalise ties and open the border at a ceremony in Zurich Saturday, but not before a three-hour delay and a decision to scrap speeches that were to be made there because of a dispute over them. The Turkish Premier said Armenia must withdraw from Nagorno-Karabakh in Azerbaijan to assure his parliaments approval for a peace accord signed between Turkey and Armenia. Turkey cannot take a positive step towards Armenia unless Armenia withdraws from Azerbaijani land ... if that issue is solved our people and our parliament will have a more positive attitude towards this protocol and this process, Erdogan told a party congress in Ankara. Armenia has rejected any link between Nagorno-Karabakh - an Armenian-majority enclave which broke free from Turkish-backed Azerbaijan after a war - and its reconciliation efforts with Turkey. Turkey closed its border with Armenia in 1993 to support Azerbaijan. Erdogan maintained that he would submit the signed pacts to normalise relations and open the shared border with Armenia to his countrys parliament, but warned of potential problems. We are going to transmit the protocols signed yesterday by our foreign minister to parliament, but our deputies, in order to ratify them, are undoubtedly going to ask about the Armenian-Azerbaijani question, he said. If Azerbaijan and Armenia begin to look for a resolution to their problems, public opinion here will have a greater appreciation of the normalisation of Turkey-Armenia relations. And that will facilitate the ratification of the protocols by parliament. The deals, which must be approved by both countries parliaments, are aimed at ending decades of hostility over the World War-I era mass killings of Armenians under Ottoman rule. Turkey had long refused to establish diplomatic links with Armenia over Yerevans efforts to have the massacres recognised as genocide - a label Turkey strongly rejects. An Armenian diplomat said Sunday that the delay in signing the deals the previous day was sparked by Ankaras intention of raising the genocide issue. But Nagorno-Karabakh has long posed problems as well. The complex diplomacy linked to it was evident on Sunday, when Azerbaijan slammed Turkey for agreeing to normalise ties with Armenia. It also warned that the opening of the Armenian-Turkish border could cause instability in the volatile South Caucasus.