The Philippine Supreme Court on Tuesday upheld the constitutionality of the third extension of martial law in the country's troubled south until the end of this year.

The high tribunal voted 9-4 to junk four petitions by groups of lawmakers, human rights lawyers and residents of the southern region of Mindanao questioning the legality of the extension until December 31.

Last December, the Senate and the House of Representatives voted to prolong martial rule in Mindanao in a bid to prevent Islamic State-allied militants from regrouping and escalating tensions in the conflict-wracked region.

President Rodrigo Duterte first declared 60 days of martial law in Mindanao on May 23, 2017. Congress extended the declaration until December 31, 2017 at Duterte's request to give troops more time to defeat the militants.

At the end of the first extension, Duterte again sought more time for martial law and Congress approved for the declaration to be effective until the end of this year.

The Marawi siege left the municipality in ruins and displaced more than half a million people. Over a year later, nearly 70,000 residents were still displaced and the main commercial area of the Islamic city has yet to be rehabilitated.

Critics have stressed that there was no reason for the extension of martial law and warned that it could be used to suppress democractic rights ahead of elections in May.

Related Story