An apparatus for forming a plug in a casing includes a body of plug material and a carrier for insertion into a casing. The carrier supports the body of plug material. The carrier includes a mandrel and at least two circular flanges spaced apart along the mandrel. The carrier also includes a heater for heating the mandrel. The mandrel is heated to a temperature above the melting point of the material and the plug material slumps into the casing between the at least two circular flanges. The at least two circular flanges force the expanded solidifying plug material against the casing which aids the transfer of heat between the mandrel and the plug material, and resists creep of the solidified material along the casing.