||The Spatial Ecosystem And Populations Dynamics Model “SEAPODYM”, based on a system of Eulerian equations and initially developed for large pelagic fish (e.g., tuna), was modified to describe spawning habitat and eggs and larvae dynamics of small pelagic fish. The spawning habitat is critical since it controls the initial recruitment of larvae and the subsequent spatio-temporal variability of natural mortality during their drift with currents. A robust statistical approach based on Maximum Likelihood Estimation is presented to optimize the model parameters defining the spawning habitat and the eggs and larvae dynamics. To improve parameterization, eggs and larvae density observations are assimilated in the model. The model and its associated optimization approach allow investigating the significance of the mechanisms proposed to control fish spawning habitat and larval recruitment: temperature, prey abundance, trade-off between prey and predators, and retention and dispersion processes. An application to the Peruvian anchovy (Engraulis ringens) and sardine (Sardinops sagax) illustrates the ability of the model to simulate the main features of spatial dynamics of these two species in the Humboldt Current System. For both species, in climatological conditions, the main observed spatial patterns are well reproduced and are explained by the impact of prey and predator abundance and by physical retention with currents, while temperature has a lower impact. In agreement with observations, sardine larvae are mainly predicted in the northern part of the Peruvian shelf (5-10 degrees S), while anchovy larvae extend further south. Deoxygenation, which can potentially limit the accessibility of adult fish to spawning areas, does not appear to have an impact in our model setting. Conversely, the observed seasonality in spawning activity, especially the spawning rest period in austral autumn, is not well simulated. It is proposed that this seasonal cycle is more likely driven by the spatio-temporal dynamics of adult fish constituting the spawning biomass and not yet included in the model.