The comments by Gen Hossein Salami, carried on state television, follow a long history of both rhetoric and confrontation between Iran and the US over the narrow strait, through which nearly a third of all oil traded by sea passes. Iran's Supreme Leader Ayatollah Ali Khamenei on Monday criticized US activities in the Persian Gulf.
It's unclear whether that signals any new Iranian concern over the strait or possible confrontation with the US following Tehran's nuclear deal with world powers.
"If the Americans and their regional allies want to pass through the Strait of Hormuz and threaten us, we will not allow any entry," Salami said, without elaborating on what he and other leaders would consider a threat.
"Americans cannot make safe any part of the world," he added. Lt Rick Chernitzer, a spokesman for the US Navy's 5th Fleet in Bahrain, said American sailors "continue to operate in accordance with professional maritime standards and international law" in the Persian Gulf region.
More From This Section
The US and Iran have a long history of confrontations in the Persian Gulf. They even fought a one-day naval battle on April 18, 1988, after the near-sinking of the missile frigate USS Samuel B Roberts by an Iranian mine during the Iran-Iraq war.
That day, US forces attacked two Iranian oil rigs and sank or damaged six Iranian vessels. A few months later, in July 1988, the USS Vincennes in the strait mistook an Iran Air flight heading to Dubai for an attacking fighter jet, shooting down the plane and killing all 290 people onboard.