A connector comprising: a terminal that includes a box-like portion , into which a mating terminal is configured to be inserted and connected, and is attached to an end of an electric wire ; a housing that has an accommodating hole accommodating the box-like portion; and a retainer that is attached to the housing in a manner to be displaceable in a crossing direction, the crossing direction crossing with a direction in which the box-like portion is inserted into the accommodating hole, and can be positioned on a first position and a second position, wherein when mutually-opposing inner surfaces of the accommodating hole are defined as an upper surface and a lower surface , a pressing piece is formed on the upper surface, the pressing piece cantilevering to protrude toward the lower surface, and a protrusion is formed on the lower surface, the protrusion protruding toward the upper surface, the retainer includes a protrusion portion that protrudes on extension of the accommodating hole, wherein the box-like portion has a step portion , when the retainer is positioned on the first position, the box-like portion is allowed to be inserted into the accommodating hole and the box-like portion inserted in the accommodating hole is pushed by the pressing piece and displaced in the crossing direction, the step portion being caught by the protrusion and retained and a rear end of the box-like portion being caught by the protrusion portion and retained, where a primary locking state is produced, and the retainer is displaced from the first position to the second position so as to increase hooking between the protrusion portion and the rear end of the box-like portion, where a secondary locking state is produced. a terminal that includes a box-like portion , into which a mating terminal is configured to be inserted and connected, and is attached to an end of an electric wire ; a housing that has an accommodating hole accommodating the box-like portion; and a retainer that is attached to the housing in a manner to be displaceable in a crossing direction, the crossing direction crossing with a direction in which the box-like portion is inserted into the accommodating hole, and can be positioned on a first position and a second position, wherein when mutually-opposing inner surfaces of the accommodating hole are defined as an upper surface and a lower surface , a pressing piece is formed on the upper surface, the pressing piece cantilevering to protrude toward the lower surface, and a protrusion is formed on the lower surface, the protrusion protruding toward the upper surface, the retainer includes a protrusion portion that protrudes on extension of the accommodating hole, wherein the box-like portion has a step portion , when the retainer is positioned on the first position, the box-like portion is allowed to be inserted into the accommodating hole and the box-like portion inserted in the accommodating hole is pushed by the pressing piece and displaced in the crossing direction, the step portion being caught by the protrusion and retained and a rear end of the box-like portion being caught by the protrusion portion and retained, where a primary locking state is produced, and the retainer is displaced from the first position to the second position so as to increase hooking between the protrusion portion and the rear end of the box-like portion, where a secondary locking state is produced. <EOS>