CAIRO — Thousands of protesters calling for the return to power of Egypt’s ousted Islamist president demonstrated in Cairo on Friday as the military warned it would crack down on any violence, underlining the point with a show of force by fighter jets flying over the capital.

Youth activists who launched the mass protests that led to Mohammed Morsi’s toppling by the military gathered in Cairo’s Tahrir Square and outside two presidential palaces to celebrate their gains, raising fears of a fresh round of clashes in the capital.

The Interior Minister in charge of police, Mohammed Ibrahim, issued a statement on the ministry’s Facebook page cautioning the ousted president’s supporters against going to Tahrir Square and warning both sides against committing acts of violence.

The rival gatherings came just days after a new interim Cabinet was sworn in that includes women, Christians and members of a liberal coalition opposed to Morsi, but no Islamists. The ousted president’s Muslim Brotherhood party has refused to take part in talks with the interim leadership.

The country has been deeply polarized over the July 3 military coup that was supported by millions who accused Egypt’s first democratically elected leader of abusing his power and giving too much influence to his Brotherhood group.

On Friday, pro-Morsi protesters waving Egyptian flags and pictures of the ousted leader chanted slogans against army chief Gen. Abdel-Fatah el-Sissi. “El-Sissi is a traitor!” the crowds shouted. “Morsi is our president!”

“The problems of the first years could have been solved by dialogue, but the opposition always refused,” said 28-year-old Osama Youssef, who traveled to Cairo from the eastern province of Sharqiya to show his support for Morsi. “The opposition didn’t succeed in getting power through constitutional measures, so it chose to take power by staging a military coup.”

Mainly Islamist supporters of Morsi have been holding a sit-in in front of a mosque in eastern Cairo since the former leader’s ouster and the numbers swelled Friday as his backers answered a Brotherhood call to join the rallies, dubbed, “Breaking the Coup.”

The Brotherhood organized marches across Cairo as thousands of people defied the sweltering heat to take to the streets in support of Morsi in other cities, including Alexandria and several Nile Delta provinces.

“People are united in their call for the return of President Mohammed Morsi, the elected, legitimate president,” said Ayman Wahid, who joined a march in Cairo. He said he represents “real Egyptians” who want Morsi back.

Yasser Meshren, who came to Cairo from the southern province of Bani Suweif, accused the military of tricking the people by overseeing the elections only to then remove Morsi, disband the country’s interim parliament and suspend the constitution, which was approved in a referendum.

Police and military troops and armored vehicles were deployed heavily in Cairo around security and military installations, court houses, and the capital’s entrances.

Minor incidents of violence broke out in Cairo, according to security officials who spoke on condition of anonymity because they weren’t authorized to give information to the media. Pro-Morsi supporters and opponents shouted at one another after Friday prayers in the main Al-Azhar Mosque and police detained six Islamist protesters for throwing rocks. Separately, a man was stabbed and hospitalized when a crowd of the deposed president’s supporters questioned his identity and found out he was a policeman in civilian clothing.

Fears of greater violence were high after 51 Islamist protesters were killed last week when the military opened fire on demonstrators outside the Republic Guard forces club. The Brotherhood has accused the troops of gunning down the protesters, while the military said it was provoked by armed Morsi supporters who were trying to storm the military building.

In response to the recent violence, Britain announced it was revoking five export licenses for equipment destined for Egypt’s military and police.

On Friday, fighter jets flew over the protesters and military spokesman Col. Ahmed Mohammed Ali issued a stern warning on Facebook, telling civilians not to pose as military personnel or approach military installations or troops, saying anyone doing so risked death.

The military also dropped flyers warning against violence as a crowd of at least 400 pro-Morsi protesters marched through northern Sinai’s main city of el-Arish. The flyers urged people to protect their land and the Sinai Peninsula from “terrorists” and provided two numbers for people to call to report suspicious behavior.

The area has been the most lawless corner of the country since autocratic leader Hosni Mubarak was ousted in a popular uprising in 2011, and the number of attacks by militants against Egyptian security forces has risen since Morsi’s overthrow. To combat the wave, Egypt has beefed up its forces there with the agreement of neighboring Israel, which is also concerned about the growing strength of religious extremists in the area.

Friday’s rallies coincided with the 10th day of the Muslim fasting month of Ramadan, which Egyptians celebrate as the day their armed forces crossed the Suez Canal in the 1973 war with Israel. The surprise assault led to the return of the Sinai Peninsula to Egypt, which had been occupied by Israel.

Fighter jets flew overhead in an air show throughout the city to commemorate the day.

Meanwhile, the Brotherhood party said seven leaders of its parent group, including the former speaker of the parliament and an ultraconservative Salafi preacher, were transported to a heavily guarded prison, a move the group said was illegal because the men have not yet been charged. They have been accused, among other things, of inciting violence.

The ousted president, who has been replaced by interim leader Adly Mansour, has been held incommunicado at an undisclosed military facility since his ouster. He has not been charged with any crimes.

The Brotherhood’s TV channel has been taken off the air along with other Islamic channels seen as sympathetic to the group. Al-Jazeera’s Egypt affiliate was raided by security forces, and on Friday, the channel’s signal, along with its flagship English and Arabic news channels, were intermittently interrupted. The reasons for the disruptions were not clear.

Pro-Morsi protester Mostafa Fathi, a 33-year-old accountant participating in a march along one of Cairo’s main roads, said he viewed Morsi’s ouster and the closure of the TV channels as signs the country was targeting Islamists, as it did during Mubarak’s near three-decade-long rule.

“We were on the right path. We had several elections. We were building democratic state institutions,” he said. “We don’t want to go back to a police state or a state of injustice.”