Duterte resumed peace talks with the Communist Party of the Philippines in 2016, but cancelled all negotiations in February 2017 following attacks and kidnapping of soldiers by NPA members, officially declaring the CPP-NPA as a terrorist group. Following the Maute Group-led occupation of Marawi, Duterte has declared martial law throughout Mindanao which was later extended for two years until 2019 in a bid to ensure order in the island. The Battle of Marawi lasted for five months from May 23 to October 17, 2017, the day after the deaths of militant leaders Omar Maute and Isnilon Hapilon, with Duterte declaring Marawi as "liberated from terrorist influence".