A polyaxial bone screw assembly includes a threaded shank body having an upper portion with a laterally extending lug and a retainer having an inner cam track for receiving the lug and thus attaching the shank upper portion to the retainer within a receiver. The retainer may be a closed or open ring. The receiver has a cavity and a U-shaped cradle defining a channel for receiving a longitudinal connecting member such as a spinal fixation rod. The retainer has an external surface that mates with an internal surface of the receiver, providing a ball joint.