An electrostimulator implant (20, 60) comprises (i) an implant body (22), the implant being injectable into tissue of a subject along a longitudinal axis of the implant body, (ii) first and second electrodes (24), disposed on respective first and second portions of the implant body; (iii) circuitry (26), disposed inside the implant body, and configured to drive the electrodes to apply current to the tissue; and (iv) a mesh (42, 62) disposed over at least 20 percent of the implant body, and configured to serve as an anchor of the implant. Other embodiments are also described.