We show that 40 is the maximum number of points of a cap in AG(4, 4). Up to semi-linear transformations there is only one such 40-cap. Its group of automorphisms is a semidirect product of an elementary abelian group of order 16 and the alternating group A5.