Diesel fuel has been in especially strong demand for the last couple years, Because of price controls in China, refiners there have been unable to raise prices enough to match the cost increases for crude oil. So it seems as though they would rather buy a tanker load of diesel or fuel oil than a tanker of crude.
Right now the dollar is getting stronger, as the long speculators unwind their trades and try to make their margin calls. But from February until June, it made sense for the Chinese, Indians, and other foreign buyers to shop for diesel in the US, cutting into our inventories and pushing diesel prices up much faster than gasoline.
Another factor -- the rest of the world had more gasoline than it needed, and was anxious to dump their surpluses in the US. So gasoline was plentiful here, prices rose much more slowly than crude prices, and it got so bad that refiners were losing money on every gallon of gasoline they produced. Since they couldn't cut gasoline production without cutting production of diesel and other distillate fuels, diesel production dropped even as diesel prices set daily records.
Final factor, and this is controversial and not everyone agrees with me... ethanol mandates replaced gasoline, but not diesel. Farmers who wanted to plant more acres of corn, to take advantage of high corn prices, burned more diesel fuel. So ethanol cut the demand for gasoline AND increased the demand for diesel... one more reason for diesel prices to go up relative to gasoline.
In the next couple years, there are many new refineries coming online around the world, and they all are being built to optimize production of distillates. More diesel and less gasoline from each barrel of crude will gradually result in diesel declining in price compared to gasoline. The sharp spike in diesel prices only took a few months, but it will likely take 12-24 months to get back to a normal price differential.