Iran issued a blunt warning to Israel on Saturday that it will launch missile strikes on Israel's nuclear facilities in the event that the Islamic republic is attacked by the Jewish state. The threat from the head of Iran's Revolutionary Guard came after a test of Israel's Arrow missile defence system on Wednesday was reported to have been a 'resounding failure'. Inside Iran's political establishment, President Mahmoud Ahmadinejad after being forced to yield to pressure from the Supreme Leader, Ayatollah Khamenei, who opposed his choice of Esfandiar Rahim Mashai as first vice president, has instead appointed the controversial candidate as his new adviser and head of the presidential office. "The head of Iran's elite Revolutionary Guard said Saturday that his country has the capability to strike Israel's nuclear facilities and wouldn't be afraid to do so if it was attacked," the Associated Press reported. " 'If the Israeli entity engages in any kind of attack on Iran, we have the capability to strike all targets in occupied Palestine,' Gen Mohammad Ali Jafari told the Arabic-language channel, al-Alam. " 'There is nothing stopping us from targeting Israel's nuclear sites and this will definitely happen if we are attacked. Our rockets have the precision capabilities to target all the Israeli nuclear sites,' he said, according to the channel's website." Yossi Melman, reporting for Haaretz said: "Despite attempts by the operators of the Arrow missile defence system in Israel to portray Wednesday night's aborted test as 'a partial success,' in reality it was nothing less than a resounding failure. The fact that the interceptor missile failed to launch in the direction of the target is damning proof that the test failed. "Overall, the goal of the test is not to assess various data systems that could be checked without launching the missile, but to launch the interceptor missile at the oncoming target. In this case, the target was a simulator missile of the Iranian Shihab, whose range exceeds 1,000 kilometres, more than enough to reach Israel. "The Defence Ministry's well-oiled public relations machine has for years propagated the notion that the Arrow system is the best in the world, and that it is capable of answering long-range missile threats against Israel. Yet, in practice, it turns out that the threats are growing more ominous, and, in this game of cat and mouse, a defence system has no chance to get up to speed with missiles whose range and efficacy are increasing at a fast pace." Iran's Fars News Agency reported: "Commenting on the missile test, Jafari said, 'In case of military action against the Islamic Republic of Iran, the entire territory of Israel will be within the range of our missiles and the IRGC has no restriction for producing ground-to-ground rockets with an appropriate range to target Israel.' " 'Our response to them will be a hard one,' the IRGC commander warned. "About Tel-Aviv's ability to intercept Iranian missiles, Jafari noted, 'Israel might be able to hit a number of our missiles but it can do nothing about a massive missile attack.'" Meanwhile, as the Islamic republic remains in the throes of political turmoil following June's disputed presidential elections, the latest rift to be exposed appears to be between the president and the supreme leader. Although President Ahmadinejad's choice for his first vice president has been blocked, Mr Ahmadinejad has nevertheless gone ahead and appointed his close confident to another position. "After a week-long furore amongst Iran's ruling elite over Ahmadinejad's vice president choice, the president appoints the deputy, who resigned, as an adviser and head of the Presidential Office," Press TV said. " 'I appoint you [Esfandiar Rahim Mashai], as a faithful and competent figure, as adviser and head of the Presidential Office,' Ahmadinejad said in a decree on Saturday. "According to the decree published on president's website, Ahmadinejad expressed hope Rahim-Mashai would be successful in serving the great Iranian nation and the Islamic establishment in cooperation with his colleagues." The Associated Press said that on Friday, hundreds of hard-line students took to the streets of Tehran calling for Mr Mashai's removal. Press TV reported earlier on Saturday: "The official dismissal of President Ahmadinejad's most senior vice president came after a handwritten note by Leader of the Islamic Revolution Ayatollah Seyyed Ali Khamenei ordering the president to remove his vice president was made public on Friday. " 'The appointment of Mr. Esfandiar Rahim Mashai as presidential deputy is contrary to your interests and that of the government and a cause of division and frustration among your supporters. It is necessary for this appointment to be declared null and void,' read the note by the Leader. "Rahim-Mashai said late Friday that since the disclosure of the letter, he no longer considered himself as the first vice president, according to Ahmadinejad's senior adviser, Mojtaba Samareh-Hashemi." Press TV also said: "Ahmad Tavakkoli, a senior principlist lawmaker, criticised President Ahmadinejad for his refusal to obey the order and fire Rahim-Mashai even seven days after the Leader issued his command. "Tavakkoli says 'based on the law and the Sharia,' Ahmadinejad was obliged to obey the leader's order when he received the letter. "The note, which is dated July 18, was publicly revealed by IRNA on July 24. "The parliamentarian also called Ahmadinejad's conduct 'unacceptable' and 'political misconduct'. " 'Unfortunately the president still does not carry out the task after seven days and Mashai announced his resignation,' he said. "Rahim-Mashai, a close confidant of Ahmadinejad and a relative to him by marriage, had angered principlists last year by saying Iranians and Israelis were friends." Earlier, Mr Mashai sought to explain the remarks he had made as head of the Cultural Heritage, Handicrafts and Tourism Organisation, saying: "What I said had nothing to do with the Israeli regime. I did not talk about the usurper Zionist regime. My remarks were about the people of the occupied lands and were in fact a psychological warfare against the Israeli regime." The Los Angeles Times said: "Questions surround the Mashai controversy. "Some analysts have said hard-liners oppose him because of friendly comments he made last year about Israel. Others say he is a member of a secretive sect, the Hojjatieh, which has a messianic worldview so extreme that the Islamic Republic's founder, Ayatollah Ruhollah Khomeini, had outlawed it. A video posted online shows Mashai making a speech in line with Hojjatieh philosophy. "According to Islamic Republic News Agency reports, Ahmadinejad has described Mashai as a 'pious man who is a devotee of Imam Mahdi,' a Shiite saint whose return is awaited by believers. "Several weeks before the June 12 presidential election, Rezai said Ahmadinejad was 'surrounded by dangerous individuals' pushing the country toward a precipice. Many considered that to be a jab at the messianic bent of some in his inner circle. "Others describe Mashai, born in 1960 in the Caspian Sea town of Ramsar, as an opportunist who has parlayed his longtime friendship with Ahmadinejad, an in-law, into a position of power. "Several sources say the two men met in the 1980s while serving in the Revolutionary Guard. Mashai cultivated strong ties to the intelligence and propaganda divisions of the Revolutionary Guard, as well as the Ministry of Intelligence and Security, where he served in the 1990s. In 2004, Ahmadinejad named him to a position within the Tehran municipality. "Publicly, conservatives say they despise Mashai for his comments about Israel. He was quoted by the semiofficial Fars news agency as saying in a July interview last year that, despite the conflict between the governments, 'Iran is friends with the American and Israeli people. No nation in the world is our enemy.' "He has since strenuously disavowed the comments. "On Friday, a news website quoted Tehran Mayor Mohammed Baqer Qalibaf as accusing Mashai and his wife of supporting the Mujahedin Khalq, an outlawed Iranian exile group that seeks to overthrow the government and that the United States considers a terrorist group. "Qalibaf said Mashai's wife is a former member of the group and the two met in prison, where he was her interrogator. A source close to the Mashai family confirmed that, saying that she had been sentenced to hang when he proposed to marry her to save her from the gallows."