A polyaxial bone anchoring device includes a bone anchoring element having a shank and a head, a head receiving part having a first end, an open second end, and a hollow interior portion for receiving the head therein, a locking ring configured to be mounted around the head receiving part and having a rod receiving portion, a cap configured to be connected to the head receiving part, the cap having a central axis and two opposite legs extending in a direction of the central axis, and a locking element configured to extend from the cap to lock relative positions of the bone anchoring element and an inserted rod relative to the head receiving part, wherein the cap is rotatable relative to the head receiving part between a first position in which the cap is movable and a second position in which the legs engage the head receiving part.