Mostafa Mohammad Najjar made his statement to mark the 25th anniversary of the recapture of an Iranian port which was seized by Iraqi forces during the two neighbors' 1980-88 war.
"Islamic Iran will resist ... any kind of threat and will give a powerful answer to enemies and oppressors," he said, according to the official IRNA news agency.
Earlier on Wednesday, nine US warships carrying 17,000 personnel entered the Gulf in what navy officials said was the largest daytime assembly of ships since the 2003 Iraq war.
US Navy officials said Iran had not been notified of plans to sail the ships, which include two aircraft carriers, through the Straits of Hormuz, a narrow channel in international waters off Iran's coast and a major artery for global oil shipments.
Tension has been increasing between Tehran and Washington over Iran's disputed nuclear work, which the West suspects is aimed at making atom bombs. The United States also accuses Iran of fomenting instability in Iraq. Tehran denies both charges.
Washington has said it wants a diplomatic solution to the nuclear row but has not ruled out using force if that fails. Iran, which insists its atomic plans are peaceful, says it will target US interests in the region if it comes under attack.
Although Iran may not have the technology to match that of US forces, experts say it could still cause trouble for shipping in the Gulf and disrupt flows of crude in the waterway, through which 40 percent of the world's traded oil is shipped.
An Iranian military commander accused the United States of working against Iran ever since the 1979 Islamic revolution but that Tehran was able to confront any enemy threats with its "special weapons and equipment".
"If one day a war is about to happen, Iran will defend its borders with more power than previous years," Alireza Afshar, described as deputy for "defense propaganda", told Mehr news agency.