The military headquarters said the attack and subsequent boarding of the ship by US forces was a violation of the ceasefire and denounced it as piracy, Iran's state-run broadcaster said.