The incidents raised fresh concerns over the security of shipping through the narrow entrance to the Persian Gulf, threatening efforts to restore normal maritime traffic and ease global economic pressures following the recent war between the United States and Iran.