Massive new street demonstrations broke out in Egypt Sunday as both supporters and opponents of ousted Egyptian resident Mohammed Morsi gathered in Cairo and Alexandria while the country's new leadership wrangles over the naming of a prime minister.

"We're seeing another day of duelling demos here," CBC reporter Derek Stoffel said from near Tahrir Square in Cairo. "Both sides, the supporters and opponents of Mohammed Morsi, had a bit of a day of rest yesterday, but both sides today are calling for huge demonstrations once again."

Secular and liberal factions trying to install one of their own as Egypt's new prime minister collided into strong resistance Sunday from the sole Islamist faction that backed the military's ouster of President Mohammed Morsi, reflecting the difficulties in building a broad coalition behind a new leadership.

As wrangling continued over the prime minister spot, giant rallies by the movements that pushed out Morsi took on a sharply nationalist tone, pervaded with posters of the military's chief and denunciations of the United States and President Barack Obama for they see as their backing of the Islamist leader.

The show of strength in the streets was aimed at fending off a determined campaign by Morsi's Muslim Brotherhood, which brought out its own supporters Sunday in large protests.

The mostly peaceful rallies, which began thinning out towards midnight local time, come after clashes two days ago between the rival camps left at least 36 dead and more than 1,000 injured nationwide.

The military said troops are beefing up security ahead of the protests and warned against any "provocative actions." Any violators will be "dealt with decisively, under the law," the army spokesman said in an official Facebook posting. In Friday's violence it sided with the anti-Morsi crowds and in one case opened fire on pro-Morsi demonstrators.

Warning that the military is turning Egypt into a "totalitarian state," Brotherhood officials vowed to stay on the streets to reverse what they call a coup against democracy and restore Egypt's first freely elected president to office.

Military warplanes swooped over the anti-Morsi crowd filling Cairo's Tahrir Square, drawing a heart shape and an Egyptian flag in the sky with colored smoke. Large banners read "Obama, hands off, a message to the USA. Obama supports the terrorists of 911" with a picture of Obama with an Islamists' beard.

Throughout Morsi's year in office, many of his opponents accused the United States of backing his administration. Washington often underlined that it was dealing with Morsi as the country's elected leader.

Before the wave of anti-Morsi protests began on June 30, U.S. Ambassador to Egypt Anne Patterson said in a speech that she was "deeply skeptical" protests would be fruitful. She defended U.S. relations with Morsi's Muslim Brotherhood as necessary because the group is part of the democratically elected government.

Anti-American slogans

Since Morsi's removal Wednesday, Washington has tread carefully, expressing concern without outright calling the army's move a coup or denouncing Morsi's ouster. On Saturday, the White House said in a statement that it rejects "false claims propagated by some in Egypt that we are working with specific political parties or movements to dictate how Egypt's transition should proceed," saying it is committed to Egyptians' aspirations for democracy.

The widespread appearance of anti-American slogans in Tahrir had a double-edged message: painting the Brotherhood as a tool of Washington and pushing back against U.S. concerns over the military's moves.

Obama "must know that this is a popular revolution," said Shawki Ibrahim, a 37-year-old in Tahrir with a portrait of army chief Gen. Abdel-Fattah el-Sissi dangling from his neck.

"The United States should support the people's will and not the interest of a person or a group seeking only their own interest," he said.

The appointment of a prime minister is the key next step in building a post-Morsi leadership. The prime minister is to hold far greater powers in running the country than the interim president — Adly Mansour, a senior judge who was sworn into the post earlier.

ElBaradei distrusted as too secular, elite

The bloc of secular, leftist and liberal factions that led the giant wave of protests against Morsi last week are now the main grouping in a loose collection of movements trying to fill out leadership posts. They are pushing for one of their own as prime minister to have a strong voice in shaping the country.

But also among them is a main party of the ultraconservative Islamist movement known as Salafis — al-Nour — which turned against Morsi months ago and backed the military's ouster of him.

On Saturday, al-Nour blocked the appointment of the most prominent liberal figure, Mohamed ElBaradei, as prime minister, who is deeply distrusted by the Islamist movement as too secular.

On Sunday, the secular-liberal bloc offered a compromise candidate — Ziad Bahaa-Eldin, a prominent financial expert and an ally of ElBaradei. The interim president's spokesman Ahmed al-Musalamani, told Egypt's ONTV that Bahaa-Eldin was the leading candidate, with ElBaradei positioned to be named vice-president.

But al-Nour again appeared prepared to block it.

"Our position is that the prime minister should not belong to a specific faction ... We want a technocrat," al-Nour Party chief Younes Makhyoun told The Associated Press. He pointed to Bahaa-Eldin's membership in the National Salvation Front, the main umbrella group of liberal parties that was Morsi's main opposition.

Al-Nour faces considerable pressure from its followers not to be seen as backing down to secular movements. Brotherhood officials claim some al-Nour members have already joined its pro-Morsi protests. When al-Nour broke with Morsi months ago, it caused a split among its ranks, with some members forming a new party that remained with the president.

Al-Nour was clearly concerned about appearing to side with the military against fellow Islamists at a time when Morsi and five other prominent Brotherhood figures have been put in detention and Islamist television stations have been put off the air.

Speaking on Al-Jazeera Mubasher Misr TV, Makhyoun warned that if the interim president throws out the Islamist-drafted constitution and appoints a panel to write a new one, the party will break with the military-backed "road map" for a transition. So far, the constitution has only been suspended and the talk has been of just amending disputed articles.

On Sunday, the Dawaa Salafia, a body of clerics allied to al-Nour, said the new leadership must be inclusive of Islamists, and it criticized the heavy hand against the Brotherhood.

'Blackmail'

"No one should rejoice for undermining the freedom of others even if they are political rivals because repression is harmful for all," it said in a statement on its website.

"The police and the army should not discriminate between citizens based on their political colour. Worse than this is to discriminate against anyone because of their Islamic disposition," it said.

The liberal and secular factions want to maintain al-Nour support to show they have a powerful Islamist voice on their side. Al-Nour won a quarter of the seats in parliament in 2011-2012 elections.

But they were infuriated by its blocking of ElBaradei, with some insisting it should not have veto power over the post. The youth activist group Tamarod accused al-Nour of "blackmail" and arm-twisting."

That raises the possibility they could eventually ignore al-Nour's demands and force through a candidate of their own. That would risk al-Nour breaking away, further solidifying Egypt's divide into Islamist and non-Islamist camps.

The prime minister will also likely have strong influence on the process of writing a new constitution. That's a major concern of al-Nour, which pushed hard for the Islamic character of the charter pushed through under Morsi's administration, which was suspended after his ouster.

Walid el-Masry, of Tamarod, said al-Nour is using the ElBaradei issue to press liberals on the constitution, worried about changes to the Islamist-drafted charter.

"They are afraid about the articles that concern the state's Islamic identity," he said, adding that the liberals assured Salafis that they won't touch these articles.

The Islamists have denounced the removal of Morsi as an army coup against democracy. Their opponents have argued the president had squandered his electoral mandate and that the Brotherhood was putting Egypt on an undemocratic path.

Pro-Morsi rallies turned out in several places around Cairo on Sunday, centred outside the Rabaah al-Adawiya Mosque where tens of thousands massed.

The Brotherhood has so far staunchly rejected any co-operation with the emerging military-backed leadership, saying Morsi must return to its posts. But in a statement late Sunday, it hinted at the possibility of listening to other initiatives -- as long as they entailed the president's reinstatement.

"Despite great bitterness, we are ready to accept the initiatives of loyal friends who call for the complete return of legitimacy, including president, constitution and (parliament)," it said.

Senior Brotherhood member Saad Emara said there was no possibility for any negotiations with the new leadership after "all betrayed us," and following the military's clampdown on the group.

With files from CBC News