We prove an extension of the Moore–Schmidt theorem on the triviality of the first cohomology class of cocycles for the action of an arbitrary discrete group on an arbitrary measure space and for cocycles with values in an arbitrary compact Hausdorff abelian group. The proof relies on a ‘conditional’ Pontryagin duality for spaces of abstract measurable maps.