In 1990s, with the downfall of Soviet Union, Armenia and Azerbaijan declared independence from the Soviet Union. Iran and Turkey were quick to recognize the independence of both countries, but Iran wanted to turn Azerbaijan into a similar theocratic Islamic regime to achieve an amicable relationship, even going as far as trying to finance for the Azerbaijani Armed Forces and sending men to fight for the Azerbaijanis in the Nagorno-Karabakh War.[16][17][18] However, it backfired when the Azerbaijani leadership, instead, embraced Turkey and not Iran.[19] To make the matter worse for Iran, Azerbaijanis in 1992 elected a pan-Turkist President, Abulfaz Elchibey, whose pro-Turkish speeches alienated Iran with an open hostility and anti-Iranian remarks.[20][21] Turkey provided Azerbaijan military necessity needs and even weaponry, as well as helping Azerbaijan to blockade Armenia, while Turkish members of Grey Wolves openly participated in the Karabakh War on Azerbaijani side; in response to increasing Iranophobic sentiment in Azerbaijan, Iran drifted toward Armenia and supplied aids for Armenia and Karabakh, though it pressured Yerevan to cease military activities over Karabakh.[22][23][24] Since then, Iranian–Turkish relations have been influenced by the shadow of the Nagorno-Karabakh War in 1990s as Iran has been accused of trying to topple Azerbaijani Government.