Under the Pilotage Act, the pilot has the conduct of the vessel. He has sole responsibility for the safe navigation of that vessel. The master is still in command. Only if the master believes that the pilot is putting his ship into danger or his crew into danger is he able to step in and take over.
On November 27th, 2014. See this statement in context.