The PRIVILEGE of the writ of habeas corpus (not the writ itself) may be suspended by the President (Sec 18, Art. VII of the 1987 Constitution), in case only of invasion or rebellion AND when public safety requires it. Consequently, the person under detention by the government may not obtain his liberty by its use.
While the person detained must still be produced in court, the official or person detaining him may ask the court not to continue the proceeding any further as the privilege of the writ as to that particular person seeking release has been suspended. Unlike in cases where the privilege o the writ is available and in full force and effect, the judge thus may be prevented in the event of suspension from determining whether or not the detention is authorized by law. But the SC is empowered to inquire, in an appropriate proceeding filed by any citizen, whether or not there was factual basis to justify the suspension by the president of the privilege.
The suspension of the privilege of the writ enables the state “to hold in preventive imprisonment pending investigation and trial of persons who plot against it or commit acts that endanger its very existence.”