Tehran: Iran said it executed 16 "rebels" Saturday in reprisal after gunmen killed at least 14 border guards near the border with Pakistan, in a rugged area often rocked by violence.

The ambush happened overnight in the mountains of Sistan-Baluchestan, a province in southeastern Iran.

The province is home to a large community of minority Sunni Muslims, unlike the rest of Shiite-dominated Iran, where drug traffickers and Sunni militants operate.

"Fourteen border guards were killed during armed clashes in the region of Saravan, and five others were wounded," the official IRNA news agency said, citing what it called an informed source.

The unnamed source identified the gunmen as "bandits or rebels opposed to the Islamic republic".

But Deputy Interior Minister Ali Abdollahi said the guards were killed in an ambush set by Iranians who were "members of hostile groups".

"Three soldiers have been taken hostage and taken to the other side of the border in Pakistan," he said, adding Iran would "take measures to secure their release".

In retaliation for the attack, the Iranian authorities said they hanged 16 "rebels" held at a prison in the region.

"Sixteen rebels linked to groups hostile to the regime were hanged this morning in the prison of Zahedan in response to the death of border guards in Saravan," Mohammad Marzieh, attorney general of Sistan-Baluchestan, was quoted as saying by Fars news agency.

Abdollah said "we warned the rebel groups that any attack targeting civilians or members of the security forces would not go unanswered".

He also called on the Pakistani government to "take measures to control the border more seriously".

The region has seen bloody clashes during the past few years.

Officials say more than 4,000 police officers and soldiers have been killed there in three decades of fighting with drug traffickers.

Iran is a major transit route for drugs that originate in Afghanistan and are trafficked across its territory, much of them bound for Western countries.

People smugglers also use the route to trafficking illegal immigrants to Europe, via Iran and Turkey.

Officials say Iran has spent millions of dollars to build a "wall" along lengthy stretches of its 1,700-kilometre (1,050-mile) eastern border with Afghanistan and Pakistan in a bid to stop the trafficking.

Work on the barrier began in the 1990s and is expected to be completed before the end of next year.

The Islamic republic says it is fighting a deadly war against drug traffickers who make up half of its prison population.

But Sunni militant group Jundallah (Soldiers of God) has also launched attacks on civilians and officials in Sistan-Baluchestan, including a December 2010 suicide bombing in the city of Shabahar that killed 39 people.

The Iranian authorities hanged 11 suspected members of Jundallah at Zahedan prison in December 2010 in response to the deadly bombing of the Shiite mourning procession in Shabahar.

Jundallah, whose leader Abdolmalek Rigi was hanged in June 2010, has been waging a deadly insurgency in southeastern Iran for almost a decade.

The group says it is fighting for the rights of the ethnic Sunni Baluchis who make up a significant part of the province`s population.