Iran and Pakistan have close cultural, religious, and economic ties dating back centuries. They share a 909 km border and were among the first to recognize each other after gaining independence. The two countries have supported each other militarily, including during the 1965 and 1971 Indo-Pakistani wars. More recently, they have sought to strengthen economic cooperation through projects like the Iran-Pakistan gas pipeline and increased bilateral trade, though American opposition to Iran has posed challenges. Defense agreements also aim to bolster military collaboration between the two neighbors.