Iran has censured attacks on two security checkpoints in the militancy-riddled Sinai Peninsula in Egypt, warning of a new wave of indiscriminate terrorist attacks by "defeated" Daesh Takfiris in different parts of the world.

“The dispersion and escape of terrorists following their heavy defeats in Iraq and Syria are a serious danger to the entire region and the world,” Iranian Foreign Ministry Spokesman Bahram Qassemi said on Friday.

He added that any compromise with terrorists or instrumental use of them would lead to a new wave of indiscriminate acts of terrorism throughout the world.

The Iranian spokesperson expressed sympathy with the bereaved families of the Daesh terrorist attacks in Sinai on Friday.

According to Egyptian security sources, attackers set off their explosive-laden vehicles while driving through the two checkpoints close to each other in the border city of Rafah in northern Sinai.

The two attacks left a total of 23 soldiers dead and at least 26 others injured, security sources said.

The Daesh Takfiri terrorist group claimed responsibility for the attacks in Sinai, which is a stronghold of Daesh-affiliated militants.

Daesh has killed hundreds of Egyptian security forces in Sinai in attacks since 2013, when it emerged after a popular coup in Cairo against then President Mohammed Morsi. There was no claim of responsibility from the group for the attack on Tuesday.

Over the past year, Daesh has expanded its attacks out of Sinai to target civilians, especially members of Egypt’s Coptic Christian community. About 100 Copts have been killed in such attacks in mainland Egypt since December.

This as the Daesh has been suffering major setbacks inflicted by government and pro-government forces in Iraq and Syria, where the militant group first took territory and gained notoriety.