Iran is a major producer of oil and also sits on the narrow Strait of Hormuz, through which much of the world’s crude passes.