Metro Manila (CNN Philippines, July 4) — The Supreme Court dismissed on Tuesday petitions questioning the legality of President Rodrigo Duterte's proclamation of martial law in Mindanao.

In a press conference, High Court spokesman Teodoro Te said 11 justices voted to junk the three consolidated petitions. One justice was in favor of granting the petition to lift martial law for lack of factual basis, while three others voted to partially uphold the proclamation within a limited area of coverage.

Those who voted to reject the petitions and uphold martial law are Associate Justices Presbitero Velasco Jr, Teresita De Castro, Diosdado Peralta, Lucas Bersamin, Mariano Del Castillo, Jose Mendoza, Bienvenido Reyes, Estela Perlas-Bernabe, Francis Jardaleza, Samuel Martirez, and Noel Tijam.

Chief Justice Maria Lourdes Sereno, Senior Associate Justice Antonio Carpio, and Associate Justice Alfredo Caguioa voted to partially grant martial law in some areas.

Associate Justice Marvic Leonen was the only justice who voted to grant the petitions.

At least eight votes were needed to nullify Proclamation 216 issued by Duterte on May 23, the day the terrorist Maute group took over Marawi City. The petitioners can file a motion for reconsideration, in which case the Supreme Court will decide with finality on the issue.

The 15 justices deliberated on the consolidated version of three petitions questioning Duterte's Proclamation 216 and citing a lack of factual basis for martial law.

Presidential Spokesperson Ernesto Abella said Duterte will fulfill his promise to end the Marawi crisis.

"The High Court has spoken: Proclamation 216 is constitutional. With the Supreme Court decision, the whole government now stands together as one against a common enemy," he said in a statement.

Former Solicitor General Florin Hilbay, meanwhile, said the ruling highlights the need to have a joint session.

Petitioner Rep. Tom Villarin warned that Duterte might abuse his power.

"Now that he is cloaked with such authority, President Duterte might push it to the limit and declare a drug-induced nationwide rebellion by terror groups. Martial law becomes a hard habit to break," he said

Oral arguments

In the three oral arguments held by the Supreme Court in June, the petitioners insisted there is no actual rebellion happening in Marawi City. Government troops have been fighting with the terrorist Maute group in that city for over a month.

Related: Marawi crisis not grounds for martial law – petitioners

Solicitor General Jose Calida had told the court that the Marawi crisis is part of a bigger plot to establish an Islamic state in Mindanao. To drive home his point, he even brought with him a flag of the international terrorist group ISIS that was recovered in Marawi.

"When he (Duterte) saw the gravity of the rebellion, he had to act decisively and swiftly. Therefore he chose the martial law tool to save Marawi from total capture by the rebels," the solicitor general pointed out.

He insisted there is sufficient factual basis for the martial law declaration.

"All elements of rebellion were present. There is actual rebellion (on) the streets of Marawi....The goal is to take over the Philippine territory," Calida argued.

The justices had an internal discussion with key players on the issue such as martial law administrator, Defense Secretary Delfin Lorenzana, and martial law implementor, AFP Chief of Staff Gen. Eduardo Año on June 15.

Lifting of martial law

Under the 1987 Constitution, the President may declare martial law for up to 60 days in case of invasion of rebellion and when public safety requires it.

Related: Duterte: I was forced to declare martial law to prevent civil war

Martial law in Mindanao is set to end on July 22, but Duterte said only the military and police can really determine when martial law can be lifted.

Lorenzana said on Monday he needs a couple more weeks to decide on this, saying he lacks enough information to make a recommendation to the President.

He explained the need to factor in the security situation in Marawi and the Maute group's ability to launch attacks.

"We'll wait for a couple of weeks more so that we will see the real picture. We don't have yet the necessary information to recommend the continuation or not of martial law," Lorenzana said.

Related: Lorenzana on lifting of martial law

Military officials believe the defenses of the Maute are crumbling, noting that some members want to surrender already.

Lorenzana, refusing to give a deadline on the end of the Marawi crisis, said he hopes the conflict ends before Duterte delivers his State of the Nation Address on July 24.

This story was updated on July 6 to add the breakdown of votes.