  The goal of this paper is to establish a topological version of the notion of
an Eilenberg-Mac Lane space. If $X$ is a pointed topological space, $\pi_1(X)$
has a natural topology coming from the compact-open topology on the space of
maps $S^1 \to X$. In general the construction does not produce a topological
group because it is possible to create examples where the group multiplication
$\pi_1(X) \times \pi_1(X) \to \pi_1(X)$ is discontinuous. This failure to
obtain a topological group has been noticed by others, for example Fabel.
However, if we work in the category of compactly generated, weakly Hausdorff
spaces, we may retopologise both the space of maps $S^1 \to X$ and the product
$\pi_1(X) \times \pi_1(X)$ with compactly generated topologies to get that
$\pi_1(X)$ is a group object in this category. Such group objects are known as
$k$-groups.
  Next we construct the Eilenberg-Mac Lane space $K(G,1)$ for any totally
path-disconnected $k$-group $G$. The main point of this paper is to show that,
for such a $G$, $\pi_1(K(G,1))$ is isomorphic to $G$ in the category of
$k$-groups.
  All totally disconnected locally compact groups are $k$-groups and so our
results apply in particular to profinite groups. This answers questions that
have been raised by Sauer.
  We also show that there are Mayer-Vietoris sequences and a Seifert-van Kampen
theorem in this theory.
  The theory requires a careful analysis using model structures and other
homotopical structures on cartesian closed categories as we shall see that no
theory can be comfortably developed in the classical world.
