A connector includes: a first connector which includes a tubular outer housing and an inner housing in which a plurality of first terminals are provided; a second connector which includes a bottomed tubular counterpart housing in which a plurality of second terminals are provided; and an elastic member which is provided in the outer housing and urges the inner housing toward a front side of the first connector in a fitting direction. The inner housing is moved by the elastic member to the front side in the fitting direction at the time of fitting.