A plug-and-socket connector (10) has a plastic housing (11) that holds electrical male or female contacts (14) in boreholes (16, 17) next to each other, and whose forward end forms a plug extension (13) or as a socket extension (113) and whose rear end receives and locks the male or female contacts (14) in the housing (11). In a plug and socket connector (10) of this type, in order to lock the male or female contacts in two ways, independently of each other, in the plastic housing (11), at the same time permitting the plastic housing (11) to be shaped using injection molding technology in a relatively simple manner, it is provided that, for receiving a male or female contact (14), a first catch (37) protrudes in the area of each borehole (16, 17) located on the other, rear housing end (12, 112), said catch being arranged on a fixed wall (36) of the rear housing end and engaging a first collar (29) of the male or female contact (14) from behind, and a second catch (41, 51) is provided on a cover (23, 24) so as to allow the radially open rear housing end (12) to be closed and covered, said catch engaging the first collar (29) or a second collar (30) of the male or female contact (14) from behind.