  We establish a bijection between the set of rigged configurations and the set
of tensor products of Kirillov--Reshetikhin crystals of type $D^{(1)}_n$ in
full generality. We prove the invariance of rigged configurations under the
action of the combinatorial $R$-matrix on tensor products and show that the
bijection preserves certain statistics (cocharge and energy). As a result, we
establish the fermionic formula for type $D_n^{(1)}$. In addition, we establish
that the bijection is a classical crystal isomorphism.
