An oxygen sensor comprising: an oxygen detection element in the form of a hollow rod which is closed at a front end, and having electrode layers (2b, 2c) formed on inner and outer surfaces of a hollow portion thereof; a rod-like heating member disposed within the hollow portion of the oxygen detection element and adapted to heat the oxygen detection element, a metallic terminal member formed so as to circumferentially surround the heating member and having an attachment portion, which is fixedly attached to an inner surface of the oxygen detection element, directly or indirectly via another member, wherein the metallic terminal member includes at least one press portion being composed of bent segments each including two planes (23d1, 23d2) and having a L-shaped cross section, taken perpendicular to the center axis 02 of the hollow portion (a) of the oxygen detection element, the bent segments causing at least a portion of the heating member to be in contact with an inner wall surface of the hollow portion of the oxygen detection element; characterised in that: the heating member is held by holding means formed separately from the metallic terminal member; and in that the planes (23d1) of the bent segments are elastically widened from inside by the heating member inserted in the metallic terminal member and thereby the resulting elastic restoration force of the planes (23d1) of the bent segments presses the heating member in a direction intersecting a center axis 02 of the hollow portion of the oxygen detection element. an oxygen detection element in the form of a hollow rod which is closed at a front end, and having electrode layers (2b, 2c) formed on inner and outer surfaces of a hollow portion thereof; a rod-like heating member disposed within the hollow portion of the oxygen detection element and adapted to heat the oxygen detection element, a metallic terminal member formed so as to circumferentially surround the heating member and having an attachment portion, which is fixedly attached to an inner surface of the oxygen detection element, directly or indirectly via another member, wherein the metallic terminal member includes at least one press portion being composed of bent segments each including two planes (23d1, 23d2) and having a L-shaped cross section, taken perpendicular to the center axis 02 of the hollow portion (a) of the oxygen detection element, the bent segments causing at least a portion of the heating member to be in contact with an inner wall surface of the hollow portion of the oxygen detection element; characterised in that: the heating member is held by holding means formed separately from the metallic terminal member; and in that the planes (23d1) of the bent segments are elastically widened from inside by the heating member inserted in the metallic terminal member and thereby the resulting elastic restoration force of the planes (23d1) of the bent segments presses the heating member in a direction intersecting a center axis 02 of the hollow portion of the oxygen detection element. the heating member is held by holding means formed separately from the metallic terminal member; and in that the planes (23d1) of the bent segments are elastically widened from inside by the heating member inserted in the metallic terminal member and thereby the resulting elastic restoration force of the planes (23d1) of the bent segments presses the heating member in a direction intersecting a center axis 02 of the hollow portion of the oxygen detection element.