Relativistic magnetohydrodynamics can be reformulated in terms of magnetic flux tubes which turn out to obey equations of non-linear strings. The string approach is applied to study how a test flux tube falls into a Kerr black hole. Analytical treatment and numerical simulations show that the leading portion of the falling tube loses angular momentum and energy as the string breaks, and to compensate for this loss, momentum and energy has to be generated to conserve energy and momentum for the tube. Inside the ergosphere the energy of the leading part can be negative, and the rest of the tube then extracts energy from the hole. Increasing centrifugal forces eject the part of the tube with extra positive energy from the ergosphere after a time producing a relativistic jet.