Iran's Intelligence Ministry confirmed on Thursday that five of the men involved in terror attacks in Iran had fought for the Islamic State in Iraq and Syria (ISIS).

A ministry statement said the men had left Iran to fight for the extremist group in Mosul, Iraq, as well as Raqqa, Syria — the group's de facto capital. ISIS has claimed responsibility for the attack.

It identified the men only by their first names, saying they didn't want to release their last names due to security and privacy concerns for their families.

The ministry also published pictures of their corpses.

The state-run IRNA news agency also reported Thursday that the death toll in the attacks — against Iran's parliament and the tomb of its revolutionary leader — had risen to 17 people killed, citing Ahmad Shojaei, the head of the country's forensic center.

Iranian authorities have said assailants were Iranian nationals, adding they have arrested six suspects, including one woman, since the attack Wednesday in Tehran.

Separately, Iran's foreign minister rejected U.S. statements about the attacks after President Donald Trump suggested the country bears some culpability for attacks in its capital.

Trump said "states that sponsor terrorism risk falling victim to the evil they promote." He also said the U.S. was grieving and praying for the victims of the attacks.

Mohammad Javad Zarif called the comments "repugnant" and accused the U.S. of supporting terror. 

"The Iranian people reject such U.S. claims," Zarif said via Twitter.