Oil prices rose as shipping threats in the Strait of Hormuz raised fears of energy supply disruptions.