A human or animal joint is treated by introduction of a device between the suitably prepared articulating surfaces of the joint, and the device is anchored in both these articular surfaces with a material having thermoplastic properties. For allowing at least limited articulation of the joint after implantation, the device includes two articulating portions, wherein one of the articulating portions is anchored in each articulating surfaces of the joint. On implantation a proximal face of the device is contacted with a vibrating tool and the vibration is transmitted through parts of the device to locations in which the material having thermoplastic properties is near the bone tissue of the articulating surfaces of the joint and in which liquefaction is desired. The liquefied material penetrates the bone tissue and, on re-solidification forms a positive fit connection between the device and the bone tissue.