A method is provided of in-situ casting well equipment wherein a metal is used which expands upon solidification. A body of such metal is placed in a cavity in a well. Before or after placing the metal in the cavity in the well, the body is brought at a temperature above the melting point of the metal. The metal of the body in the cavity is solidified by cooling it down to below the melting point of the metal.