In a statement on Iran's state news agency, Iranian foreign ministry spokesman Bahram Qasemi said his country rejects "Hariri's claims against Iran as a repetition of false and unfounded anti-Iran accusations by the Zionist regime, the Saudis and the Americans".
Hariri said Iran had fomented "disorder and destruction" in the country and meddled in the internal affairs of Lebanon and other Arab states.
Referring to Hezbollah, which is backed by Iran, Hariri said: "Iran's arm ... has managed to impose a fait accompli on Lebanon through the power of its weapons" in the last few decades. "They have built a state within a state," he said.
"I say to Iran and its allies - you have lost in your efforts to meddle in the affairs of the Arab world," he continued, adding that the region "will rise again and the hands that you have wickedly extended into it will be cut off".
Hariri's resignation has stoked fears of an escalation in the regional divide between Iran and the Gulf states, primarily Saudi Arabia, with Lebanon - a politically unstable country - on the front lines.
"The sudden resignation of Mr. Hariri and its announcement in another country is not only a source of pity and wonder, but also indicates he is playing in a ground where the ill-wishers of the region have designed," Qasemi said in the statement.
Hussein Sheikh al-Islam, adviser to Iranian Supreme Leader Ayatollah Ali Khamenei, also responded to Hariri's speech, saying the resignation was "done with planning by Donald Trump, the president of America, and Mohammed bin Salman, the crown prince of Saudi Arabia".
Hariri, a leading Sunni politician, has been in office for less than a year, but previously served as prime minister between 2009 and 2011.
He assumed office again in late 2016 in a power-sharing government headed by President Michel Aoun, a supporter of Hezbollah, whose members have been accused by the International Court of Justice of assassinating Hariri's father, Rafik, in a 2005 bombing.
The country spent two years in political deadlock without a president before Aoun's election in October 2016, after Hariri endorsed the latter - a move seen by some analysts as a sign of Iran's influence in Lebanon.
On Friday, after a meeting with Hariri in Beirut, a senior adviser to Iran's Supreme Leader congratulated Lebanon for its stability and the formation of the coalition government.
Hariri's resignation now casts doubt on Lebanon's political future.
Walid Jumblatt, the leader of Lebanon's Druze and the Progressive Socialist Party, said Hariri's resignation could adversely affect the country.
He said it was the latest evidence of a power struggle between Saudi Arabia and Iran, and urged an intensification of diplomatic efforts to defuse tensions.
"Lebanon is too small and vulnerable to bear the economic and political burden that comes with this resignation," Jumblatt said via social media.
"I will continue to call for dialogue between Saudi Arabia and Iran."
Source: Al Jazeera News