A method for anchoring a joining element in an object with the aid of a thermoplastic material and mechanical vibration, the method comprising the steps of: providing an opening in the object, the opening having a mouth (5.1) situated in a surface of the object and a cylindrical or slightly conical wall extending away from the mouth (5.1), providing a joining element with a proximal end and a distal end being distanced from each other along an axis, the proximal end being equipped with a contact face (1.1) which is suitable for being contacted with a vibrating tool for applying, to the joining element, mechanical vibration and a pressing force, the joining element comprising between the proximal end and the distal end a substantially cylindrical or slightly conical wall anchoring portion (3.2) with a circumferential surface, which comprises the thermoplastic material and is equipped with energy directors (4.2) in the form of ribs or humps, providing a cylindrical or slightly conical sealing portion (3.1, 30.1) having a smooth circumferential surface by not being equipped with energy directors, which sealing portion (3.1, 30.1) is positionable coaxially on a proximal side of the wall anchoring portion (3.2) with a border line or a border groove (6.1) therebetween, wherein a cross section of the sealing portion (3.1, 30.1) is an envelope of a cross section of the wall anchoring portion (3.2) and wherein the cross section of the sealing portion (3.1, 30.1) has a form corresponding to the form of a cross section of the mouth (5.1) and is larger than the latter such that it can be forced into the mouth (5.1) resulting in a press fit, positioning a distal end of the wall anchoring portion (3.2) into or onto the mouth (5.1) and the sealing portion (3.1, 30.1) onto a proximal end of the wall anchoring portion (3.2) and forcing the wall anchoring portion (3.2) and at least a distal part of the sealing portion (3.1, 30.1) through the mouth (5.1) by applying mechanical vibration and a force parallel to the joining element axis, whereby the thermoplastic material on the circumferential surface of the wall anchoring portion (3.2) is at least partly liquefied and pressed into the walls of the opening and wherein the liquefied material is prevented from exiting through the mouth (5.1) by the sealing portion (3.1, 30.1). providing an opening in the object, the opening having a mouth (5.1) situated in a surface of the object and a cylindrical or slightly conical wall extending away from the mouth (5.1), providing a joining element with a proximal end and a distal end being distanced from each other along an axis, the proximal end being equipped with a contact face (1.1) which is suitable for being contacted with a vibrating tool for applying, to the joining element, mechanical vibration and a pressing force, the joining element comprising between the proximal end and the distal end a substantially cylindrical or slightly conical wall anchoring portion (3.2) with a circumferential surface, which comprises the thermoplastic material and is equipped with energy directors (4.2) in the form of ribs or humps, providing a cylindrical or slightly conical sealing portion (3.1, 30.1) having a smooth circumferential surface by not being equipped with energy directors, which sealing portion (3.1, 30.1) is positionable coaxially on a proximal side of the wall anchoring portion (3.2) with a border line or a border groove (6.1) therebetween, wherein a cross section of the sealing portion (3.1, 30.1) is an envelope of a cross section of the wall anchoring portion (3.2) and wherein the cross section of the sealing portion (3.1, 30.1) has a form corresponding to the form of a cross section of the mouth (5.1) and is larger than the latter such that it can be forced into the mouth (5.1) resulting in a press fit, positioning a distal end of the wall anchoring portion (3.2) into or onto the mouth (5.1) and the sealing portion (3.1, 30.1) onto a proximal end of the wall anchoring portion (3.2) and forcing the wall anchoring portion (3.2) and at least a distal part of the sealing portion (3.1, 30.1) through the mouth (5.1) by applying mechanical vibration and a force parallel to the joining element axis, whereby the thermoplastic material on the circumferential surface of the wall anchoring portion (3.2) is at least partly liquefied and pressed into the walls of the opening and wherein the liquefied material is prevented from exiting through the mouth (5.1) by the sealing portion (3.1, 30.1).