Azerbaijan says a peace deal between Armenia and Turkey could threaten security in the region and "cast a shadow" over its relations with Ankara.
Azerbaijan's Foreign Ministry said a peace deal should not have been signed while Armenian troops remain in Nagorno-Karabakh, scene of a decades-old dispute between Armenia and traditional Turkish ally Azerbaijan.
Turkey cut ties and shut its border with Armenia in 1993 in support of Turkic-speaking Azerbaijan, which was then fighting a losing battle against Armenian separatists in Nagorno-Karabakh.
But Turkey and Armenia signed a landmark peace accord on Saturday to restore ties and open the shared border after a century of hostility stemming from the World War One mass killing of Armenians by Ottoman forces.
"The normalisation of relations between Turkey and Armenia before the withdrawal of Armenian troops from occupied Azeri territory is in direct contradiction to the national interests of Azerbaijan," the Azeri Foreign Ministry said.
In a strongly worded statement, the ministry added the deal "casts a shadow over the fraternal relations between Azerbaijan and Turkey, which are built on historical roots".
"Considering the importance of the opening of all borders and communication in the region, Azerbaijan believes the unilateral opening of the Turkey-Armenia border calls into question the architecture of regional peace and security," the statement said.
In an indication of the many pitfalls that lie ahead of the deal's implementation, Saturday's ceremony was marred by a three-hour delay due to last-minute disagreements on statements.