Iran's Revolutionary Guards chief Mohammad Ali Jafari speaks during a conference. (Reuters)

Highlights 27 Revolutionary Guards were killed in the Iran suicide bombing

Iran warned that Pak would pay a heavy price for harbouring terrorists

Pakistan has denied backing terrorists

Iran warned neighbouring Pakistan on Saturday it would "pay a heavy price" for allegedly harbouring terrorists who killed 27 of its elite Revolutionary Guards in a suicide bombing near the border earlier this week, state television reported.

Revolutionary Guards chief Major General Mohammad Ali Jafari also accused Tehran's regional rival Saudi Arabia and the United Arab Emirates of supporting terrorist groups that attack Iranian forces, saying they could face "reprisal operations."

Pakistan, Saudi Arabia and the UAE deny backing such terrorists.

"Why do Pakistan's army and security body ... give refuge to these anti-revolutionary groups? Pakistan will no doubt pay a high price," Jafari said in remarks live on state television.

Jafari was addressing a large crowd gathered for the funeral of the victims of Wednesday's suicide bombing, which took place in a southeastern region where security forces are facing a rise in attacks by terrorists from the country's Sunni Muslim minority.

"Just in the past year, six or seven suicide attacks were neutralised but they were able to carry out this one," Jafari told the mourners, who packed a square in the central city of Isfahan and roads leading to it.

The Sunni group Jaish al Adl (Army of Justice), which says it seeks greater rights and better living conditions for the ethnic minority Baluchis, claimed responsibility for the attack.

"The treacherous Saudi and UAE governments should know that Iran's patience has ended and we will no longer stand your secret support for these anti-Islam criminals," Jafari said.

"We will avenge the blood of our martyrs from the Saudi and UAE governments and ask the President (Hassan Rouhani) ... to leave our hands free more than ever for reprisal operations," Jafari told the crowd, drawing chants.

Iran's Shi'ite Muslim authorities say terrorist groups operate from safe havens in Pakistan and have repeatedly called on the neighbouring country to crack down on them.

Jafari's remarks came amid heightening regional tensions after Israel and the Gulf Arab states attended a summit in the Polish capital Warsaw this week where the United States hoped to ratchet up pressure against Iran.