A rod-shaped implant element (1) is provided for connecting at least two bone anchoring elements (2, 3), each of which comprising an anchoring section (21, 21) to be anchored in the bone and a receiver member (22, 22) to be connected to the rod-shaped implant element, the rod-shaped implant element comprising: a longitudinal axis at least one first length of a rigid section (4)that is configured to cooperate with and be received in the receiver member a second length of a flexible section (8) adjacent to the rigid section a bore (9) coaxial to the longitudinal axis and extending through the rigid section and the flexible section and a core (12) accommodated in the bore, the core having two opposite ends, wherein at least one end of the core is freely movable in the bore when said flexible section is extended or compressed in a direction of the longitudinal axis.