1922 committee, or in layman's, his own back benchers. we have to remember that the PM post is, by tradition, the leader of the largest party. if the party kick their leader out (or they resign the leadership) then the party elects its new leader and that person de facto becomes PM.
all this...