TEHRAN, Iran -- Two suicide bombers blew themselves up near a mosque in southeastern Iran on Wednesday, killing at least 39 people, including a newborn baby, at a Shiite mourning ceremony, state media reported.
The attack took place outside the Imam Hussein Mosque in the port city of Chahbahar, near the border with Pakistan, the official IRNA news agency said.
The bombers targeted a group of worshippers at a mourning ceremony a day before Ashoura, which commemorates the seventh century death of the Prophet Muhammad's grandson Hussein, one of Shiite Islam's most beloved saints.
An armed Sunni militant group called Jundallah, or Soldiers of God, claimed responsibility in a statement posted on its website. The group has carried out sporadic attacks in Iran's southeast to fight alleged discrimination against the area's Sunni minority in overwhelmingly Shiite Iran.
The group said Wednesday's attack was a second act of revenge for the execution of its leader, Abdulmalik Rigi, in June.
"This operation is a warning to the Iranian regime that it must end its interference in the religious affairs of the Sunnis, stop executions and release the prisoners," said the Internet statement. "Otherwise, martyrdom operations will continue with a stronger forcer."
One of the attackers detonated a bomb outside the mosque and the other struck from inside a crowd of worshippers, state TV reported.
Security forces shot one of them, but the bomber was still able to detonate the explosives, the report said, quoting deputy Interior Minister Ali Abdollahi. A third attacker was arrested, state TV said.
Forensic official Fariborz Ayati put the number of dead at 39 and said they included three women and one newborn baby, IRNA reported.
Mahmoud Mozaffar, a senior Iranian Red Crescent Society official, said emergency services had been put on alert over the past few days because of anonymous threats, according to another news agency, ISNA.
The deputy interior minister blamed Sunni militants, an apparent reference to Jundallah.
"Evidence and the kind of equipment used suggest that the terrorists were affiliated with extremist ... groups backed by the U.S. and intelligence services of some regional states," Abdollahi was quoted as saying by state TV.
Iranian officials claim Jundallah, which has operated from bases in Pakistan, receives support from Western powers, including the United States. Washington denies any links to the group, and in November the State Department added Jundallah to a U.S. list of foreign terrorist organizations.
President Barack Obama condemned the attack and said the United States stands with the loved ones of those killed and with the Iranian people.
"This and other similar acts of terrorism recognize no religious, political or national boundaries. The United States condemns all acts of terrorism wherever they occur," Obama said in a statement released by the White House.
Parliamentary speaker Ali Larijani said the bombing sought to sow discord among Shiite and Sunni Muslims.
"The aim of the terrorists ... is to sow discord among Shiites and Sunnis," he said. "Such actions can be done only by the Zionist regime and the U.S."
In July, two suicide bombers blew themselves up at a mosque in the same province, Sistan-Baluchestan, killing at least 28 people. Jundallah had said that attack, too, was revenge for the execution of its leader a month earlier.
Like Wednesday's attack, that strike also targeted Shiite worshippers during a holiday, the birthday of Hussein, the prophet's grandson.
The group has also attacked members of Iran's Revolutionary Guard, the country's most powerful military force.
In its deadliest strike, a suicide bomber hit a meeting between Guard commanders and Shiite and Sunni tribal leaders in the border town of Pishin in October 2009, killing 42 people, including 15 Guard members.
Drug traffickers and smugglers also are active along the barren frontier area of Iran, Pakistan and Afghanistan and have launched attacks on security forces.