Thousands of opponents and supporters of Egypt's Islamist president have flocked to key locations in the nation's capital ahead of rival mass rallies, four days before a nationwide referendum on a contentious draft constitution.

The protesters were beginning to gather just hours after masked assailants set upon opposition protesters staging a sit-in at Tahrir Square, firing birdshot and swinging knives and sticks, according to security officials.

At least 11 protesters were wounded in the pre-dawn attack, according to a health ministry spokesman quoted by the official MENA news agency.

The violence increased tensions ahead of the mass demonstrations in Cairo by supporters and opponents of President Mohammed Morsi over the disputed draft constitution. The charter has deeply polarised the nation and triggered some of the worst violence since Mr Morsi took office in June as Egypt's first freely elected president.

Protests are also planned elsewhere in Egypt, including the Mediterranean city of Alexandria and Suez to the east of Cairo.

The latest spate of violence in Egypt has divided the country into two camps: Mr Morsi, his Muslim Brotherhood and ultraorthodox Salafis on the one side, and liberals, leftists and Christians, on the other.

The Tahrir protesters belong to the liberal opposition, which claims the draft of the charter restricts freedoms and gives Islamists vast influence over the running of the country.

The draft, hurriedly adopted late last month in a marathon session by a constituent assembly dominated by the president's Islamist allies, is going to a nationwide referendum on Saturday.

There have been at least two dozen attacks on offices of Mr Morsi's Muslim Brotherhood, according to the group's leaders. Meanwhile, senior opposition figures, including former lawmakers, have been badly beaten by pro-Morsi Islamists.

Also in Cairo, several hundred Islamists were camped out near a media complex on the western outskirts of the city that is home to several independent TV networks critical of Mr Morsi and the Brotherhood. The Islamists have threatened to storm the complex.

The opposition has yet to decide whether to campaign for a "no" vote or call for a boycott of the referendum - something many see as a reflection of divisions within the opposition.

The disparate opposition groups are led by reformist and Nobel Peace prize laureate Mohamed ElBaradei, Egypt's former foreign minister and Arab League chief Amr Moussa, and leftist politician Hamdeen Sabahi.

Cracks in the opposition's unity first appeared last weekend when one of its leading figures, veteran opposition politician Ayman Nour, accepted an invitation by Mr Morsi to attend a "national dialogue" meeting. On Monday, another key opposition figure, El-Sayed Badawi, of the Wafd party, met Mr Morsi at the presidential palace.

The opposition has said it would not talk to Mr Morsi until he shelves the draft constitution and postpones the referendum.

Anticipating unrest on the day of the referendum, Mr Morsi has ordered the military to join the police in maintaining security and protecting state institutions until after the results of the vote are announced. The decree went into effect on Monday.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.