Updated publication reference for PubMed record(s): 30782790. The flatworm Macrostomum lignano features a duo-gland adhesive system that allows it to repeatedly attach to and release from substrates in seawater within a minute. However, little is known about the molecules involved in this temporary adhesion. In this study, we showed that the attachment of M. lignano relieds on the secretion of two large adhesive proteins, Macrostomum lignano adhesion protein 1 (Mlig-ap1) and Mlig-ap2. We revealed that both proteins are expressed in the adhesive gland cells and that their distribution within the adhesive footprints was spatially restricted. RNA interference knock-down experiments demonstrated the essential function of these two proteins in flatworm adhesion. Negatively-charged modified sugars in the surrounding water inhibited flatworm attachment, while positively-charged molecules impeded detachment. In addition, we found that M. lignano could not adhere to strongly hydrated surfaces. We propose an attachment-release model where Mlig-ap2 attaches to the substrate and Mlig-ap1 exhibits a cohesive function. A small negatively-charged molecule is secreted that interferes with Mlig-ap1, inducing detachment. These findings are of relevance for fundamental adhesion science and efforts to mitigate biofouling. Further, this first model of flatworm temporary adhesion may serve as the starting point for the development of synthetic reversible adhesion systems for medicinal and industrial applications.