AbstractEpidemic models are used to analyze the progression or outcome of an epidemic under different control policies like vaccinations, quarantines, lockdowns, use of face-masks, pharmaceutical interventions, etc. When these models accurately represent real-life situations, they may become an important tool in the decision-making process. Among these models, compartmental models are very popular and assume individuals move along a series of compartments that describe their current health status. Nevertheless, these models are mostly Markovian, that is, the time in each compartment follows an exponential distribution. Here, we introduce a novel approach to simulate general stochastic epidemic models that accepts any distribution for the sojourn times.