“No mind would accept dialogue at gunpoint,” said Mohamed Abu El Ghar, an opposition leader, alluding to previously floated ideas about last-minute talks for constitutional amendments.

Nor did Mr. Morsi’s Islamist allies expect his proposals to succeed. Many said they had concluded that much of the secular opposition was primarily interested in obstructing the transition to democracy at all costs, to try to block the Islamists from winning elections. Instead, some of the president’s supporters privately relished the bind they believed Mr. Morsi had built for the opposition by giving in to some demands, forcing their secular opponents to admit they are afraid to take their case to the ballot box.

For now, the military appears to back Mr. Morsi. Soon after the state newspaper Al Ahram suggested the president would impose martial law, a military spokesman read a statement over state television that echoed Mr. Morsi’s own speeches.

The military “realizes its national responsibility for maintaining the supreme interests of the nation and securing and protecting the vital targets, public institutions and the interests of the innocent citizens,” the spokesman said, warning of “divisions that threaten the State of Egypt.”

“Dialogue is the best and sole way to reach consensus that achieves the interests of the nation and the citizens,” he added. “Anything other than that puts us in a dark tunnel with drastic consequences, which is something that we will not allow.”

If Mr. Morsi goes through with the plan, it would represent a historic role reversal. For six decades, Egypt’s military-backed authoritarian presidents used martial law to hold on to power and to jail Islamists like Mr. Morsi, a former leader of the Muslim Brotherhood. It would also come just four months after he managed to pry power out of the hands of the country’s top generals, who had seized control when Hosni Mubarak was ousted last year and then held on to it for three months after Mr. Morsi’s election.

The announcement of impending martial law marked the steepest escalation yet in the political battle between Egypt’s new Islamist leaders and their secular opponents over the draft constitution.