A system and method for welding of biological tissue by applying an RF voltage during a first stage to electrodes of a tissue welding tool; monitoring tissue impedance, and determining a minimum tissue impedance value during the first stage; determining relative tissue impedance; detecting when the relative tissue impedance reaches a predetermined relative tissue impedance value and starting a second stage; calculating the duration of the second stage as a function of the duration of the first stage; and applying the RF voltage during the second stage to the electrodes of the tissue welding tool.