Who will be liable if a tort is committed by a servant who is lent to another person?

In Mersey Docks and Harbour Board v. Coggins and Griffith(Liverpool) Ltd., Lord Porter observed that the most satisfactory test to ascertain who is the employer at any particular time, is to ask who is entitled to tell the employee the way in which he is to do the work upon which he is engaged. If someone other than his general employer is authorised to do this, he will, as a rule, be the person liable for the employee’s negligence. But it is not enough that the task to be performed should be under his control, he must also control the method of performing it.