Azerbaijan on Thursday denounced what it called "slanderous" comments by a senior Iranian military commander, the latest sign of fractious relations between the oil-rich Caspian Sea neighbours.
Baku made the remarks a day after Azeri security services said they were investigating "a terror attack" after a lawmaker with strong anti-Iranian views was shot and wounded at his home.
The Azeri defence ministry said Kiumars Heydari, head of Iran's regular army ground forces, had stated that members of the Islamic State militant group had fought for Azerbaijan and were still based in the country.
"(This) is groundless and totally unacceptable. Generally speaking, there are no foreign elements on the territory of Azerbaijan," the ministry said in a statement. It called the reported comments "vile, defamatory and slanderous".
Relations between Azerbaijan and Iran, which has a large population of ethnic Azeris in its northwest, have been strained in recent months. In January, Azerbaijan closed its embassy in Tehran following what it called a "terrorist attack" that killed the embassy's head of security.
Baku is also unhappy about signs of improving relations between Iran and Armenia, which lost a 2020 war against Azerbaijan over the disputed territory of Nagorno-Karabakh.
The defence ministry statement complained that Tehran had clearly taken Armenia's side.
"Today it is no secret to anyone that if Armenia has two main allies in the world, France is one of them, and Iran is the other," it said.
(Reporting by Nailia Bagirova; writing by David Ljunggren; Editing by Leslie Adler)