A coupling assembly for coupling a rod to a bone anchoring element, including a receiving part having first and second ends, a recess at the first end for the rod, and an accommodation space for a head of the bone anchoring element, the accommodation space having an opening at the second end to permit insertion of the head into the receiving part, a retainer element configured to be arranged at least partially in the accommodation space and to hold at least part of the head, and a spring element configured to be arranged at least partially in the accommodation space and to be compressed in an axial direction. The retainer element and the spring element are separate parts. When the retainer element and the spring element are in the accommodation space of the receiving part in a first position, the spring element extends into the recess of the receiving part.