It was a stunning upset for the Conservative Party leader, who was first elected in 2004.