We are concerned with questions of the following type. Suppose that $G$ and $K$ are topological groups belonging to a certain class $cal K$ of spaces, and suppose that $phi:K to G$ is an abstract (i.e. not necessarily continuous) surjective group homomorphism. Under what conditions on the group $G$ and the kernel is the homomorphism $phi$ automatically continuous and open? Questions of this type have a long history and were studied in particular for the case that $G$ and $K$ are Lie groups, compact groups, or Polish groups. We develop an axiomatic approach, which allows us to resolve the question uniformly for different classes of topological groups. In this way we are able to extend the classical results about automatic continuity to a much more general setting.