This paper describes the design, fabrication, and characterization of a sensor for moderately strong magnetic fields (~0.1 T and above) based on a heterojunction bipolar transistor (HBT). Our ferromagnetic-semiconductor hybrid device consisted of a mesa-isolated multistep single heterojunction InGaAs/InP HBT with an integrated 3-D thin-film magnetic structure formed on the base-collector mesa. The latter structure was optimized by simulation to focus the magnetic field into the base region of the HBT, where the interaction of the charge carriers and the magnetic field takes place. We report a minimum signal-to-noise ratio for the sensors of 36.4 dB, magnetic field sensitivity of at least 33.9% T-1, an angle sensitivity of 10% rad-1, and an equivalent noise of at most 2 mT. The sensors are novel in that they are fabricated using a highly scaled layer design of the type used in radio-frequency monolithic microwave integrated circuits and are suitable for incorporation in such circuits to increase functionality for low overhead in, for example, distributed sensor networks.