As heatwaves are expected to increase in frequency and intensity in the Mediterranean Sea due to global warming, we conducted an in situ mesocosm experiment for 20 days during the late spring and early summer of 2019 in a coastal Mediterranean lagoon to investigate the effects of heatwaves on the composition and function of coastal plankton communities. A heatwave was simulated by elevating the water temperature of three mesocosms to +3°C while three control mesocosms had natural lagoon water temperature, for 10 days. Further, the heating procedure was halted for 10 days to study the resilience and recovery of the system. Automated high frequency monitoring of dissolved oxygen concentration and saturation, chlorophyll-a fluorescence, photosynthetic active radiation, salinity, and water temperature was completed with manual sampling for nutrient and phytoplankton pigment analyses. High-frequency data were used to estimate different functional processes: gross primary production (GPP), community respiration (R), and phytoplankton growth (μ), and loss (l) rates. Ecosystem stability was assessed by calculating resistance, resilience, recovery, and temporal stability in terms of the key functions (GPP, R, μ, and l). Meanwhile, the composition of phytoplankton functional types (PFT) was assessed through chemotaxonomic pigment composition. During the heatwave, GPP, R, μ, and l increased by 31, 49, 16, and 21%, respectively, compared to the control treatment. These positive effects persisted several days after the offset of the heatwave, resulting in low resilience in these key functions. However, GPP and R recovered almost completely at the end of the experiment, suggesting that the effect of the heatwave on these two rates was reversible. The heatwave also affected the PFT composition, as diatoms, prymnesiophytes, and cyanobacteria were favored, whereas dinoflagellates were negatively affected. By highlighting important effects of a simulated marine heatwave on the metabolism and functioning of a coastal Mediterranean plankton community, this study points out the importance to extend this type of experiments to different sites and conditions to improve our understanding of the impacts of this climate-change related stressor that will grow in frequency and intensity in the future.