The last government holdouts in Sirte finally fell to anti-Gaddafi fighters on 20 October , and, following the controversial death of Muammar Gaddafi, Libya was officially declared "liberated" on 23 October , ending 42 years of Gaddafi's leadership in Libya.