I am considering the following two isomorphisms:
First, if $X$ is a reasonably nice topological space, then $X$ has a normal covering space which is maximal with respect to the property of having an abelian group of deck transformations. The group of deck transformations of this covering space is isomorphic to the abelianizatin of the fundamental group of $X$, which can be identified with the singular homology group $H_1(X,\mathbb{Z})$.
Second, if $K$ is a number field, class field theory gives an isomorphism between the Galois group of the maximal abelian unramified extension of $K$ (the Hilbert class field) and the ideal class group of $K$. The ideal class group can be identified with the sheaf cohomology group $H^1(\mathrm{Spec}(\mathcal{O}_K),\mathbf{G}_m)$.
Given the apparent similarity between these two theorems, is there some more general theorem which implies both of these results as special cases?