Abstract. Due to their role as primary producers, phytoplankton are essential to the productivity of estuarine ecosystems. However, it is important to understand how these nearly passive organisms are able to persist within estuaries when river inflow results in a net outflow to the ocean. Estuaries also represent challenging habitats due to a strong salinity gradient. Little is known about how phytoplankton are able to be retained within estuaries. We present a new individual-based Lagrangian model of the Elbe estuary which examines possible retention mechanisms for phytoplankton. Specifically, we investigated how reproduction, sinking and rising, and diel vertical migration may allow populations to persist within the estuary. We find that vertical migration, especially rising, favors retention, while fast sinking does not. We further provide first estimates of outwashing losses. Our simulations illustrate that riverbanks and tidal flats are essential for the long-term survival of phytoplankton populations, as they provide refuges from strong downstream currents. These results contribute to the understanding needed to advance the ecosystem-based management of estuaries.