A bone anchoring device includes an anchoring element having a shaft for anchoring in the bone and a head, a receiving part formed in one piece, and a pressure element formed in one piece. The receiving part has a seat for receiving the head and an outer channel for receiving a rod to be connected to the anchoring element, which is pivotable with respect to the receiving part and can be fixed at an angle by exerting pressure via the pressure element onto the head. The pressure element is movable in the receiving part and includes an inner channel for receiving the rod and a spring element that engages a portion of the receiving part via a detent connection so that the pressure element can be held in a position that allows pivoting of the anchoring element. The spring element is formed by at least a first portion of one of two side walls forming the inner channel, the first portion being spaced apart from a second portion of the one side wall by a slot. At least a portion of the detent connection is located on the one side wall.