The PM has outmanoeuvred his political rivals, baptised his faithfuls and ghostwritten his own legacy.