Iranian President Hassan Rouhani's statement comes hours after US President Donald Trump said he was willing to have talks with Iran.
Iranian President Hassan Rouhani said he favours talks and diplomacy but not under current conditions, state news agency IRNA said late on Monday.
"Today's situation is not suitable for talks and our choice is resistance only" IRNA quoted Rouhani as saying.
US President Donald Trump said earlier on Monday that Iran would be met with "great force" if it attempted anything against US interests in the Middle East, adding that Tehran has been very hostile toward Washington.
Trump told reporters as he departed the White House for an event in Pennsylvania that he was willing to have talks with Iran "when they're ready."
Trump's 'genocidal taunts won't end Iran'
Iran's Foreign Minister Mohammad Javad Zarif said on Monday the "genocidal taunts" of US President Donald Trump will not "end Iran", amid a spike in tensions between the two countries.
Goaded by #B_Team, @realdonaldTrump hopes to achieve what Alexander, Genghis & other aggressors failed to do. Iranians have stood tall for millennia while aggressors all gone. #EconomicTerrorism & genocidal taunts won't "end Iran". #NeverThreatenAnIranian. Try respect—it works!— Javad Zarif (@JZarif) May 20, 2019
The comments by Iran's top diplomat follow an ominous warningby Trump, who on Sunday suggested the Islamic republic would be destroyed if it attacked US interests.
If Iran wants to fight, that will be the official end of Iran. Never threaten the United States again!— Donald J. Trump (@realDonaldTrump) May 19, 2019
Earlier, Zarif downplayed the prospect of a new war in the region , saying Tehran opposed it and no party was under the "illusion" the Islamic republic could be confronted.
"We are certain... there will not be a war since neither we want a war nor does anyone have the illusion they can confront Iran in the region," Zarif told state-run news agency IRNA at the end of a visit to China.
Relations between Washington and Tehran plummeted a year ago when Trump pulled out of a landmark 2015 nuclear deal with Iran and imposed tough sanctions.
Tensions have risen further this month with Washington announcing further economic measures against Tehran, before deploying a carrier group and B-52 bombers to the Gulf over unspecified Iranian "threats".
The claim has been met with widespread scepticism outside the US.
The Trump administration last week ordered non-essential diplomatic staff out of Iraq, citing threats from Iranian-backed Iraqi armed groups.
On Sunday a rocket was fired into the Green Zone of the Iraqi capital Baghdad, which houses government offices and embassies including the US mission. It was not immediately clear who was behind the attack.
Journalist Tara Kangarlou has more on the recent tension between the two countries.
Saudi Arabia's Minister of Foreign Affairs Adel al Jubeir said on Sunday the kingdom does not want war but will defend itself.
A week ago, four oil tankers were targeted in an alleged act of sabotage off the coast of the United Arab Emirates and days after Iran-allied Yemeni rebels claimed a drone attack on a Saudi oil pipeline.
Saudi Arabia has blamed the pipeline attack on Iran. Gulf officials say an investigation into the tanker incident is underway.
Saudi King Salman invited Gulf leaders and Arab states to two emergency summits in Mecca on May 30 to discuss recent "aggressions and their consequences" in the region.