Let S be a semigroup of matrices over a field such that a power of each element lies in a subgroup (i.e., each element has a Drazin inverse within the semigroup). The main theorem of this paper is that there exist ideals I0,...,I, of S such that I0 Q ■ ■ ■ Ç I, = S, I0 is completely simple, and each Rees factor semigroup Ik/Ik_x, k-1,...,t, is either completely 0-simple or else a nilpotent semigroup. The basic technique is to study the Zariski closure of 5, which is a linear algebraic semigroup.