A basic fact taught in undergraduate algebra courses is that every finite nilpotent group is a direct product of p-groups. Already Bruck observed that this does not generalize to loops. In particular, there exist nilpotent loops of size 6 which are not direct products of loops of size 2 and 3. Still we show that every finite nilpotent loop (A,⋅) has a binary term operation ∗ such that (A,∗) is a direct product of nilpotent loops of prime power order, i.e., (A,∗) is supernilpotent. As an application we obtain that every nilpotent loop of order pq for primes p,q has a finite basis for its equational theory.