If the mayor goes on to win the by-election he would be able to a launch a leadership challenge against the PM.