Abstract: Various component parts of a sensor main body are integrally insert molded, and are mounted to a mounting bracket member which is adapted to be securely attached to an external member such as a vehicle body. The sensor mount member defines a recess closely receiving an end of the molded casing, and these two parts are securely joined together by ultrasonic welding. Simultaneously, necessary electric connections are effected when the sensor main body is fitted into this recess via pin and socket connectors. Thus, both the reliability and the mechanical strength of the magnetic sensor can be ensured without involving the use potting material and the process of making electric connections which are known to complicate the fabrication process.