  We consider Yang-Mills theories with general gauge groups $G$ and twists on
the four torus. We find consistent boundary conditions for gauge fields in all
instanton sectors. An extended Abelian projection with respect to the Polyakov
loop operator is presented, where $A_0$ is independent of time and in the
Cartan subalgebra. Fundamental domains for the gauge fixed $A_0$ are
constructed for arbitrary gauge groups. In the sectors with non-vanishing
instanton number such gauge fixings are necessarily singular. The singularities
can be restricted to Dirac strings joining magnetically charged defects. The
magnetic charges of these monopoles take their values in the co-root lattice of
the gauge group. We relate the magnetic charges of the defects and the windings
of suitable Higgs fields about these defects to the instanton number.
