We establish class field theory for three-dimensional manifolds and knots. For this purpose, we formulate analogues of the multiplicative group, the idèle class group, and ray class groups in a cocycle-theoretic way. Following the arguments in abstract class field theory, we construct reciprocity maps and verify the existence theorems.