UN Secretary-General Ban Ki-moon said he rejects threats by any state that it might take military action against another.
Speaking at the opening of the annual UN General Assembly, Ban said, "Any such attacks would be devastating."
Ban did not specify what countries he was talking about.
In recent months, rising tensions over Iran's nuclear program have included warnings from Israel, a U.S. ally, that it might take military action against Iran if Tehran ignores UN requests to stop uranium enrichment and other controversial nuclear activities.
Western powers accuse Iran of seeking nuclear weapons, a charge Iran denies.
Based on reporting by Reuters and AFP