A system is described that measures, with a sampling frequency of 1 kHz, the orientation and position of a blowfly (Calliphora vicina) flying in a volume of 0.4 x 0.4 x 0.4 m3. Orientation is measured with a typical accuracy of 0.5 degrees, and position with a typical accuracy of 1 mm. This is accomplished by producing a time-varying magnetic field with three orthogonal pairs of field coils, driven sinusoidally at frequencies of 50, 68, and 86 kHz, respectively. Each pair induces a voltage at the corresponding frequency in each of three miniature orthogonal sensor coils mounted on the animal. The sensor coils are connected via thin (12-microm) wires to a set of nine lock-in amplifiers, each locking to one of the three field frequencies. Two of the pairs of field coils produce approximately homogeneous magnetic fields, which are necessary for reconstructing the orientation of the animal. The third pair produces a gradient field, which is necessary for reconstructing the position of the animal. Both sensor coils and leads are light enough (0.8-1.6 mg for three sensor coils of 40-80 windings, and 6.7 mg/m for the leads, causing a maximal load of approximately 5.7 mg) not to hinder normal flight of the animal (typical weight 80 mg). In general, the system can be used for high-speed recordings of head, eye or limb movements, where a wire connection is possible, but the mechanical load on the moving parts needs to be very small.