CAIRO — Egypt’s military-backed government instructed its security forces on Wednesday to end two sit-ins by tens of thousands of supporters of the deposed Islamist president, a decree that many feared could lead to a new round of violent confrontations.

In a televised statement, the cabinet said the sit-ins were disruptive and represented “a threat to the Egyptian national security and an unacceptable terrorizing of citizens.”

For weeks, supporters of the former president, Mohamed Morsi, have been occupying two squares in Cairo — Rabaa al-Adaweya in Nasr City and Nahdet Misr in Giza — to protest his ouster on July 3. They have vowed to remain until Mr. Morsi is released from detention and reinstated.

The sit-ins have become nuisances for the government, and flash points for the bloodiest confrontations since Mr. Morsi’s ouster, including the killings of more than 140 of his Islamist supporters by Egyptian security services. And as they grow more permanent, with stores and barbers and even their own television station, the encampments have become potent symbols of Egypt’s impasse.