Confirming a conjecture of Erdős on the chromatic number of Kneser hypergraphs, Alon, Frankl and Lovász proved that in any
$q$-colouring of the edges of the complete
$r$-uniform hypergraph, there exists a monochromatic matching of size
$\lfloor \frac {n+q-1}{r+q-1}\rfloor$. In this paper, we prove a transference version of this theorem. More precisely, for fixed
$q$ and
$r$, we show that with high probability, a monochromatic matching of approximately the same size exists in any
$q$-colouring of a random hypergraph, already when the average degree is a sufficiently large constant. In fact, our main new result is a defect version of the Alon–Frankl–Lovász theorem for almost complete hypergraphs. From this, the transference version is obtained via a variant of the weak hypergraph regularity lemma. The proof of the defect version uses tools from extremal set theory developed in the study of the Erdős matching conjecture.