A machine tool comprising: a first spindle for holding a first workpiece (W1); a first drive source for moving the first spindle in an axial direction, wherein the first drive source is an electric motor; a second spindle for holding a second workpiece (W2); a second drive source for moving the second spindle in the axial direction; and a control means (C) for controlling the rotation of the first spindle , the rotation of the second spindle and the operation of the second drive source , so as to bring the first workpiece (W1) held by the first spindle and the second workpiece (W2) held by the second spindle into contact with each other while rotating them relative to each other, thereby to carry out friction-heating, and to stop the relative rotation of the first workpiece (W1) and the second workpiece (W2), and move only the second spindle in the axial direction while holding the first spindle stationary, thereby to carry out friction-welding of the first workpiece (W1) and the second workpiece (W2), characterized in that : the machine tool further comprises torque detecting means for detecting the torque applied to the first drive source ; and the control means (C) is adapted to control operation of the first drive source upon the friction-welding of the first workpiece (W1) and the second workpiece (W2), so as to resist the torque detected by the torque detecting means and maintain the axial position of the first spindle . a first spindle for holding a first workpiece (W1); a first drive source for moving the first spindle in an axial direction, wherein the first drive source is an electric motor; a second spindle for holding a second workpiece (W2); a second drive source for moving the second spindle in the axial direction; and a control means (C) for controlling the rotation of the first spindle , the rotation of the second spindle and the operation of the second drive source , so as to bring the first workpiece (W1) held by the first spindle and the second workpiece (W2) held by the second spindle into contact with each other while rotating them relative to each other, thereby to carry out friction-heating, and to stop the relative rotation of the first workpiece (W1) and the second workpiece (W2), and move only the second spindle in the axial direction while holding the first spindle stationary, thereby to carry out friction-welding of the first workpiece (W1) and the second workpiece (W2), characterized in that : the machine tool further comprises torque detecting means for detecting the torque applied to the first drive source ; and the control means (C) is adapted to control operation of the first drive source upon the friction-welding of the first workpiece (W1) and the second workpiece (W2), so as to resist the torque detected by the torque detecting means and maintain the axial position of the first spindle . the machine tool further comprises torque detecting means for detecting the torque applied to the first drive source ; and the control means (C) is adapted to control operation of the first drive source upon the friction-welding of the first workpiece (W1) and the second workpiece (W2), so as to resist the torque detected by the torque detecting means and maintain the axial position of the first spindle . <EOS>