CAIRO—The leaders of Egypt's military warned they would intervene in the country's political crisis if President Mohammed Morsi fails to resolve it within 48 hours, raising the prospect of a military takeover just one day after millions of Egyptians marched to demand the president's resignation.

"If the people's demands are not met, the military, which is forced to act according to its role and duty, will have to disclose its own future plan," said Gen. Abdel Fattah Al Sisi, Egypt's defense minister and the head...