Abstract: In a torque sensor, a first detection tube (13) made from magnetic material covers a cylindrical magnetic leak prevention member (12) that is made from nonmagnetic material and covers a first shaft (3) made from magnetic material. Magnetic resistance to magnetic flux, which passes through one end of the first detection tube (13) and one end of a second detection tube (14) that is made from magnetic material and rotates together with a second shaft (4), changes according to elastic relative rotation of the two shafts (3, 4) corresponding to transmitted torque, by providing a plurality of teeth (13a, 14a) along the circumferential direction at the one end of each detection tube (13, 14). The first shaft (3) and the first detection tube (13) are integrated with the magnetic leak prevention member (12) so that they can rotate together, by being inserted in a mold for forming the magnetic leak prevention member (12) before the synthetic resin material is poured into the mold.