  We prove the local Kudla--Rapoport conjecture, which is a precise identity
between the arithmetic intersection numbers of special cycles on unitary
Rapoport--Zink spaces and the derivatives of local representation densities of
hermitian forms. As a first application, we prove the global Kudla--Rapoport
conjecture, which relates the arithmetic intersection numbers of special cycles
on unitary Shimura varieties and the central derivatives of the Fourier
coefficients of incoherent Eisenstein series. Combining previous results of Liu
and Garcia--Sankaran, we also prove cases of the arithmetic Siegel--Weil
formula in any dimension.
