The method involves transferring metal or metal alloy in a liquid phase and penetrating a porous layer (1) by the metal or metal alloy during heat treatment. The porous layer is made of metal or metal alloy e.g. silver, gold and copper, and another porous layer (2) is made of metal or metal alloy e.g. zinc and germanium, where temperature is held below melting temperature of the metal alloy. A firmly bonded connection between electronic components (4) e.g. semiconductor components, or contact elements and substrates (3) e.g. printed circuit boards, is manufactured after cooling.