Metro Manila (CNN Philippines, July 22) — Martial law stays in Mindanao until the end of the year.

The Senate and House of Representatives on Saturday granted President Rodrigo Duterte's request to extend military rule in the south until December 31, 2017. Proclamation 216, which declared martial law in Mindanao, expires at 10 p.m. on July 22.

A total of 261 lawmakers voted in favor and 18 were against.

A majority vote of the two chambers voting jointly, or at least 158 of the 314 members of Congress, was needed to pass the motion.

A total of 279 lawmakers, or 20 senators and 259 congressmen, were present at the Batasang Pambansa in Quezon City. Senator Leila de Lima was unable to attend as she is detained at Camp Crame for drug charges.

Aside from declaring martial law in Mindanao, Proclamation 216 suspended the writ of habeas corpus. The proclamation was issued on May 23 when the ISIS-inspired Maute group stormed Marawi City, the capital of Lanao del Sur.

In his letter to Senate President Koko Pimentel and House Speaker Pantaleon Alvarez dated July 18, Duterte said government needs five more months to quell the rebellion in Mindanao.

Also read: Duterte wants to extend martial law until end of 2017

On July 21, Duterte said the Armed Forces and Philippine National Police recommended the five-month extension to cover the rehabilitation period for war-torn Marawi and prevent the possible retaliation of terrorist sympathizers.

"No, sa kanila yan (No, it's theirs) ... The contamination of the ideology na nakita nilang patay, might spur others just to do the same," Duterte said.

This is the first time Congress voted to extend a martial law proclamation.

Aside from the 14-year martial law declared by late strongman Ferdinand Marcos in 1972, former President Gloria Macapagal Arroyo also declared martial law in Maguindanao in December 2009 following the Maguindanao Massacre, which killed 57 people, including media practitioners.

Arroyo's martial law only lasted eight days. She lifted it even before Congress could review her proclamation.

Palace: Martial law extension essential to peace

Meanwhile, Malacañang released a statement following the joint session Saturday, saying now that the debate on the extension is over, the country must refocus its attention to make sure peace and order is maintained in Mindanao.

"The extension of martial law is essential to the overall peace and stability. The rebellion in Marawi continues to persist and we want to stop the spread of the evil ideology of terrorism and free the people of Mindanao from the tyranny of lawlessness and violent extremism," Presidential Spokesman Ernesto Abella said.

"There is much work to be done in the recovery, reconstruction and rehabilitation of Marawi," he added.

Drilon: No evidence to support Mindanao martial law extension to Dec. 31

Senate Minority Leader Franklin M. Drilon gave an explanation on why he voted against the extension of martial law until the end of 2017.

He said there was "no evidence of actual rebellion outside of Marawi City," and the declaration of martial law for a period longer than his proposed 60 days would mean they have failed to do their duty as lawmakers under the Constitution.

Drilon said, under the Constitution martial law can be declared only if "actual rebellion exists," and Congress may extend its duration if it is necessary.

He said, "The factual basis for a continued martial rule in Mindanao and an extension of up do December 31, 2017 do not meet the requirements of the Constitution."

Drilon said the President mentioned only 10 out of 27 provinces in Mindanao that are under threat, so it follows that martial law should be extended only in these areas "where actual rebellion exists."

Drilon also questioned the reason behind the extension when Duterte and security officials mentioned "significant progress" against rebels.