The story of its success has not been straightforward.