19 -
Deutsche Wochenschach, 1907
14+11. (RV) Matt in 3 Zügen
[r3k2r/4N3/1P2P3/2PpKpPN/2p1p1p1/1PP1n3/2p1P1P1/R2b1B1Q]
If black still can do both castlings, his last move must've been d7-d5 or f7-f5, since a pawn capture on d5 or f5 would take too many captures.
Now suppose black can't castle queenside. Then #3 with 1. Ng6!
The last case is: Black can't castle kingside. Then #3 with 1. Nc6!.
Solution by Philippe Schnoebelen