Iran–Palestine relations  The Islamic Republic of Iran officially endorses the creation of a Palestinian state, regarding Palestine as a state. Ayatollah Khamenei, the Supreme Leader of Iran, rejects a two-state solution and implies that Palestine is inseparable, while Iran's former President Mahmoud Ahmadinejad called for a free referendum for the entire Palestinian population, including Arab citizens of Israel, to determine the type of government in the future Palestinian state, while reiterating that establishment of a Palestinian state alongside Israel would "never mean an endorsement of the Israeli occupation". Prior to the 1979 Iranian Revolution, the Palestinian Liberation Organization (PLO) held close ties with Iranian opposition groups. Following the revolution, Iran ended its alliance with Israel and started supporting the Palestinians, symbolized by turning over the Israeli embassy in Tehran to the Palestine Liberation Organization. Iran was the second majority Muslim nation after Turkey to grant (de facto) recognition of Israel, under the rule of Shah Mohammed Reza Pahlavi. Before the 1979 Revolution, Iran and Palestine purportedly engaged in secret trade and military relations, unbeknown to Israel. Iran provided the Palestinian Liberation Organization with arms to combat Israeli forces in occupied territories. However, as Iran also maintained clandestine relations with Israel at the time, it had to keep its alliance with Palestine a secret from Israel. During the 1967 war, Iran provided Palestinian militants with funds and ammunition. However, Palestine, as well as the Arab states, lost the war, and Palestinians asked to seek asylum into Iran. Iran, not intending to mar its relations with Israel, chose not to provide the Palestinian refugees with shelter. The PLO backed the 1979 revolution, and several days after the revolution, PLO chief Yasser Arafat led a Palestinian delegation to Iran. The Palestinian delegates were publicly welcomed, and symbolically handed the keys to the former Israeli embassy in Tehran, which later became a Palestinian embassy. After the eruption of the second Palestinian intifada, in September 2000 after the collapse of Middle East peace talks at Camp David, Arafat released imprisoned Hamas and Islamic Jihad militants, a decision that restored the relations between Iran and the Palestinian National Authority. The renewed support became evident when Israeli commandos captured the Karine A in 2002, a ship carrying 50 tons of advanced weaponry from Iran to Gaza. Hamas is a militant and political organization currently in power in the Gaza Strip. According to Mahmoud Abbas, President of the Palestinian National Authority, "Hamas is funded by Iran. It claims it is financed by donations, but the donations are nothing like what it receives from Iran.