The Taleban ruled Afghanistan between 1996 and 2001 , when they were toppled in a US-led invasion .