“The people empowered me, the people chose me, through a free and fair election,” he said.

“Legitimacy is the only way to protect our country and prevent bloodshed, to move to a new phase,” Mr. Morsi said. “Legitimacy is the only thing that guarantees for all of us that there will not be any fighting and conflict, that there will not be bloodshed.”

“If the price of protecting legitimacy is my blood, I’m willing to pay it,” he said. “And it would be a cheap price for the sake of protecting this country.”

Mr. Morsi was responding to a threat by the military issued a day earlier that he had 48 hours to meet the protesters’ demands, or the generals would set a political road map for the future. With the clock still ticking on that deadline — set for about 3 p.m. Wednesday Egyptian time — it still remained possible that the sides could reach some compromise or power-sharing arrangement. But the vehemence of the president’s speech and the official reports of arrests made the possibility seem remote.

Shortly after his speech, the extent of Mr. Morsi’s isolation became clear when a statement was issued on the cabinet’s official Twitter account condemning it. “The cabinet declares its rejection of Dr. Morsi’s speech and his pushing the country toward a civil war,” the statement declared. “The cabinet announces taking the side of the people.” The cabinet spokesman had resigned, and it was unclear who had taken over the Twitter account.