CAIRO — Supporters of Egypt's Islamist president rallied in a massive demonstration Friday in a show of force against opponents demanding his ouster amid increasing tension and polarization in the country.

Demonstrators gathered in a main boulevard near Cairo's presidential palace, many with their fists raised, carrying pictures of President Mohammed Morsi and chanting religious slogans.

"Islamic, Islamic despite the secularists," shouted the crowd, underscoring the religious flavor of the demonstration.

"God choose for us Mohammed Morsi," a top Brotherhood leader, Massoud el-Sabhi, told the president's supporters, many of whom were bused to the Egyptian capital from far-flung provinces.

"Our battle is an identity battle, against communism and secularism," read a banner, while another declared: "The people want to implement Islamic Shariah law." Brotherhood members in red helmets and carrying white plastic sticks manned makeshift checkpoints, searching bags and checking IDs as demonstrators streamed into the boulevard where the rally was held.

"I am here to support the legitimacy of an elected president who was chosen by the people through the ballot box," said Saad Ismail, 43-year-old teacher from the Nile Delta province of Beheira.

"We want to ensure the Islamic identity of Egypt," he added. "The majority of people want to be governed by Islamic laws."

Morad Ali, a spokesman of the Brotherhood's political arm, the Freedom and Justice party, estimated the crowd at about 2 million people. The main boulevard, along with several side streets were packed as protesters streamed in for hours. But a more realistic estimate should be well in excess of 100,000.

The rally was meant to counter plans by Morsi's opponents to stage mass demonstrations on June 30 — the anniversary of his coming to power in 2012 — to demand that he step down. Morsi was elected after a popular uprising ousted President Hosni Mubarak in 2011.

The June 30 protest campaign is rooted in a months-long petition drive. Organizers announced on Thursday that they have collected up to 15 million signatures supporting Morsi's ouster and early presidential election.

In the run-up to the anniversary, protests and clashes have spread across the country over Morsi's appointment of 17 new governors, seven of them members of his group. In a particularly striking move, a member of an ex-militant group was named governor of the ancient city of Luxor. The city witnessed killings of tourists in 1997 at the hands of the same militant group.

Earlier this week, protesters in Luxor and elsewhere used chains to lock up offices of the new governors, sat fire to car tires, and clashed with Brotherhood supporters.

Morsi's year in power has been marred by constant political unrest and a sinking economy. His opponents charge that he and his Brotherhood have been systematically amassing power, excluding liberals, secular groups and even ultraconservative Salafi Muslims.

A persistent security vacuum and political turmoil have frightened away foreign investors and tourists. Egypt's already battered economy has continued to slide, draining foreign currency reserves and resulting in worsening fuel shortages and electricity cuts along with increasing unemployment. All of these factors have added to anti-Morsi sentiments, further polarizing the nation.

His backers charge that the opposition, having lost elections, is trying to impose its will through street protests. Their counter-campaign is taking on increasingly religious tones.

A 20-year-old veiled university student Doha Abdel-Salam said she joined the rally to denounce calls for secularism by "those who are supposed to be intellectuals."

"So, it is very clear there is a war on Islam," Abdel-Salam said, adding she came not to defend Morsi or the Brotherhood, but "to defend my religion."

Even though Friday's gathering was dubbed "1 million people rally against violence," it was accompanied by religious edicts from pro-Brotherhood clerics who gave the green light to fighting against Morsi's opponents, describing the opposition's June 30 protests as a "religious war."

On Thursday, a leader of the radical Islamist Gamaa Islamiya, Assem Abdel-Maged, told a gathering in the southern city of Minya that those conspiring against Morsi include Coptic Christian extremists, Communists and remnants of Mubarak's regime.

"Our dead are in heaven, and their dead are in hell," Andel-Maged said.

Meanwhile, Ashraf Abdel-Moniem, a preacher and member of a pro-Morsi's Islamist umbrella known as Religious Legal Commission for Rights and Reform said that killing those who take up arms against Muslims on June 30 is permissible.

In a video circulated on social networking sites, he said "those who raise an arm against Muslims and threaten them with death or fight them or kill them, they have no sanctity, and it is even a duty to push them back, even by killing them if they don't retreat."

However, Morsi's hard-line Islamist backers were snubbed on Wednesday when Sheik Ahmed el-Tayeb, the grand imam of the Al-Azhar Mosque in Cairo, said that peaceful protests against the president are permitted.

Al-Azhar is the Sunni Muslim world's foremost seat of learning and styles itself as a voice of moderation. With the political rise of ultraconservatives since Mubarak's fall in February 2011, el-Tayeb and other leading Al-Azhar clerics have actively pushed back against their strict interpretations.

Also Friday, several thousand anti-Morsi protesters held their own gathering outside the Defense Ministry, a few kilometers (miles) from the Islamist rally.

"Leave, leave, the people want the fall of the regime," the protesters chanted.