Just after takeoff, at about 40 feet above ground level, the engine began to misfire and run roughly, then failed completely. The pilot dumped the load and commenced a steep turn to the left in an attempt to land on a track behind the aircraft. During the turn he realised that the aircraft would not make the chosen area and the aircraft was stalled into the tops of the trees. After the impact it descended steeply to the ground. The pilot escaped with scratches and some bruising. Subsequent inspection of the engine found that the left magneto had become detached from its mountings because of the loss of the retaining nuts. The mount bolts of both magnetos were fitted with spring washers rather than being lockwired. When the left magneto detached it pulled and broke the right magneto switch lead. It appears that the broken lead then contacted part of the engine and grounded the right magneto, depriving the engine of an ignition source.