British interverntion in Egypt

Why did the British intervene in Egypt in 1882? What were they trying to achieve? Why did they then move into the Sudan? Why did it take them so long to conquer the Sudan: what obstacles did they face, what were their constraints, and what sort of opposition did they encounter? What international factors affected British decisions during this period?
source:Dominic Green, Three Empires on the Nile