The piston–flow interaction induced by a piston pushing hydraulically resisted gas through a long tube is discussed. It is shown that the hydraulic resistance causes a significant precompression and preheating of the gas adjacent to the piston’s edge. In the case of an explosive premixture this development may lead to a localized autoignition triggering detonation. It is suggested that the problem may serve as a guide for understanding the deflagration-to-detonation transition in tubes, with the piston modeling the impact of the advancing flame.