Prior Incantato

Prior Incantato is the spell that, if pointed at someone else's wand, can show the last spell performed. It was used by Amos Diggory to figure out whose wand was used to cast the Dark Mark at the 1994 Quidditch World Cup.