TEHRAN, Iran — Iranian leaders on Friday accused the United States and Saudi Arabia of supporting the Islamic State-claimed dual attacks that killed 17 people in Tehran this week, as thousands of Iranians attended a funeral ceremony for the victims.

“Death to America,” “Death to the Saud” ruling family, and “We are not afraid,” shouted the crowd gathered behind a lorry bearing the coffins of 15 of the 17 people killed in Wednesday’s attacks.

Burials were held in the provinces for the two others killed when gunmen and suicide bombers stormed Tehran’s parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini. Fifty people were wounded.

An Israeli flag appeared alongside the US and Saudi flags in a poster during the ceremony displaying all three dripping with read ink, ostensibly meant to symbolize blood.

Iranians mourn during the funeral of the victims of the attacks on Tehran's parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini, in the capital Tehran on June 9, 2017. AFP / ATTA KENARE)

Iranians mourn during the funeral of the victims of the attacks on Tehran’s parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini, in the capital Tehran on June 9, 2017. (AFP/Atta Kenare)

The country’s Supreme Leader said the attacks will add to the hatred that Iranians harbor toward the US and Saudi Arabia.

In a condolence message ahead of a funeral for the victims, Ayatollah Ali Khamenei said the attack “will not damage the Iranian nation’s determination and the obvious result is nothing except an increase in hate for the governments of the United States and their stooges in the region like Saudi (Arabia),” which he called “a tribal state very far from anything like a democracy,” state media reported.

On Thursday, Iran’s Intelligence Minister Mahmoud Alavai said investigators were working to determine whether Saudi Arabia had a role Wednesday’s attacks but said it was too soon to say if that was the case.

During the funeral, Parliament Speaker Ali Larijani called the US the “international” version of the Islamic State group and said Washington had exchanged democracy for money, a reference to a recent huge arms deal between the US and Saudi Arabia. State TV broadcast the ceremony live.

He said anti-Iranian remarks by Saudi Arabia’s foreign minister and US President Donald Trump are a “matter of disgrace” for them.

Larijani also criticized a Wednesday decision by the US Senate to move forward on a new set of sanctions against Iran, including its elite Revolutionary Guards, a move that came on the same day as the Tehran attacks.

Iranians mourn during the funeral of the victims of the attacks on Tehran's parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini, in the capital Tehran on June 9, 2017. AFP / ATTA KENARE)

Iranians mourn during the funeral of the victims of the attacks on Tehran’s parliament complex and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini, in the capital Tehran on June 9, 2017. (AFP/Atta Kenare)

The US “knows that the Revolutionary Guard and its Quds force are the most important regional forces fighting terrorists,” he said.

The imposition of such sanctions “demonstrates their alignment with terrorists in the region,” said the speaker, a moderate conservative.

Reportedly two guards, 10 government staffers and five civilians were killed in the attacks that simultaneously targeted the country’s parliament and shrine of late founder of the Islamic Republic Ayatollah Ruhollah Khomeini.

IS has long vowed to attack Iran because the country had deployed military advisers and support to both Syria and Iraq in their fights against the extremist group.

IS released a video overnight of the five attackers before the assault, via its Amaq propaganda agency.

Attackers in new video

“Allah permitting, this is the first brigade that was established (in Iran) but it will not be the last,” one of them said, as the group sat masked in a circle with their weapons.

The jihadist group had earlier released footage of the attackers from inside the building, also via Amaq — a rare claim of responsibility while an assault was still going on.

Although the US military is also fighting IS in Syria, as well as Iraq, Trump said in response to the attacks in Iran that the country is reaping what it sows.

That drew fire from Iran’s foreign minister, Mohammad Javad Zarif, who tweeted: “Repugnant WH (White House) statement… as Iranians counter terror backed by US clients.”

Since Trump took office in January, relations between Washington and Tehran have worsened.