Iran's President Hassan Rouhani has rejected the resignation of Foreign Minister Mohammad Javad Zarif two days after he publicly said he plans to step down. In a letter to Mr Zarif reported by the state-linked IRNA news agency, Mr Rouhani said that he was aware of the pressures placed on the country’s diplomats but that he saw the foreign minister as an integral part of the state. He said he therefore could not accept the resignation as it would not be in the national interest. In an Instagram post on Wednesday, Mr Zarif shared an image of the Iranian flag and thanked the people and the leadership for their support in him. "As a modest servant, I have never had any concern but elevating the foreign policy and the status of the foreign ministry," he said in the post. He said he appreciated the support "of the honourable people of Iran, the elite and statesmen during my tenure, especially in the past 30 hours." Mr Zarif was later seen on television signing two agreements with Armenia as he appeared to be carrying on his duties. In a ceremony broadcast live on state TV, Mr Zarif signed two agreements to expand co-operation between Iran and Armenia. The news came shortly after Iran's powerful Revolutionary Guards general Qassem Soleimani said on Wednesday that Mr Zarif had the backing of the country's leader and remained the person in charge of the country's foreign policy. Mr Zarif announced in an Instagram post on Monday that he would be stepping down as foreign minister. "Mr Zarif is in charge of the foreign policy of the Islamic Republic and has always been supported by the top officials,” Mr Soleimani, the head of the Quds Force — the extraterritorial branch of the Islamic Revolutionary Guard Corps — was quoted as saying by Fars news agency. Although Mr Soleimani did not address the resignation directly, his comments will be seen as a sign that Mr Zarif could stay on. In his unexpected Instagram post on Monday, Mr Zarif apologised for his “shortcomings” as foreign minister. His announcement was met with consternation by many in Tehran on Tuesday morning. At least 150 MPs signed a letter to Mr Rouhani urging him to reject Mr Zarif’s resignation and the stock market took a hit in early trading dropping over 1 per cent on the back of the news when markets opened. “Undoubtedly the Iranian people, government and state will not benefit from this resignation,” said Mostafa Kavakebian, a reformist MP who was among those calling for Mr Rouhani to reject the resignation. The 59-year old Mr Zarif, who has served as Mr Rouhani’s foreign minister since 2013, has faced constant pressure and criticism from hardliners in the country as well as from the international community and the United States. One of the architects of the 2015 nuclear deal with the West, Mr Zarif’s critics claimed vindication when US President Donald Trump announced that he was withdrawing from the agreement last year. Since then, the US has pursued a maximalist approach to Iran and has imposed tough sanctions while at the same time corralling allies around the world to abide by them. The impact in Tehran has been acute with the economy taking a massive hit by the loss of oil exports. The impact of a collapsing currency has hit the people of Iran with traders staging several rallies and protests at the lack of action to stabilise the economy. But Mr Rouhani and his allies like Mr Zarif are also coming under increasing pressure from reformists in the country who criticise the government for failing to open up the country economically and socially. The president has faced calls to resign in recent months and parliament has hauled him before MPs to be quizzed on his administration’s policies. However, Ayatollah Ali Khamenei has said that he has faith in the president and wants to see him see out his full term until 2021.