An explosion prevention system is an unidirectional in-line liquid deflagration flame arrester, that is able to detect flames via sensors. In case of an emergency, the casing of the device is flooded to act as a liquid flame arrester, eventually extinguishing the flames.