"While condemning this (attack), (Iran) expresses condolences with the nation and the families of those killed," Foreign Ministry spokesman Mohammad Ali Hosseini said in a statement, a copy of which was made available to The Associated Press.
"Attacking innocent people, irrespective of their race and nationality, is contrary to divine and human values no matter which group or person carries out such an act under any name," the Iranian statement said.
Despite lack of diplomatic relations between the two, Iran has in the past condemned violence and terrorist attacks in the United States, including the Sept. 11, 2001 attacks, the deadliest on U.S. soil.
The U.S. and Iran broke relations in 1979, after Iranian students stormed the U.S. Embassy in Tehran and held its occupants hostage for 444 days.
Relations somewhat thawed after reformist former President Mohammad Khatami called for dialogue to bring down the "wall of mistrust," but ties worsened after U.S. President George W. Bush named Iran as part of the "the axis of evil."
The United States and Iran are also at odds over Tehran's controversial nuclear program. Washington accuses Tehran of seeking to build nuclear weapons, a charge Iran denies.