Nineteen people have been killed during riots in Cairo as Christians protesting against a recent attack on a church were assaulted by thugs who fired pellets and threw stones at them.

Four protesters and two soldiers died and 40 people were injured outside the state television building on Sunday night, according to Egyptian security and hospital officials. The clashes spread to nearby Tahrir Square and the area around it.

Gunshots were heard outside the building, where lines of riot police with shields tried to hold back hundreds of Christian protesters, who chanted "This is our country." Thick black smoke from burning vehicles filled the air. Security forces eventually fired teargas to disperse the protesters.

Thugs with sticks chased the Christian protesters from the site, banging metal street signs to scare them off. One soldier collapsed in tears as ambulances rushed to the scene to take away the injured. Television footage of the riots showed some of the Coptic protesters attacking a soldier, while a priest tried to protect him.

The trouble began when thousands of Coptic Christians protesting against the latest attack on a church in southern Egypt came under attack as they chanted denunciations of Egypt's military rulers, whom they accuse of leniency in dealing with a series of anti-Christian attacks.

"The people want to topple the field marshal," the protesters yelled, referring to the head of the ruling military council, Hussein Tantawi.

The rally began in the Shubra district of northern Cairo, then headed to the state television building where men attacked the Christian protesters. It was not immediately clear who the attackers were.

Egypt's Coptic Christian minority makes up about 10% of the country's population of more than 80 million. As Egypt undergoes a chaotic power transition and security vacuum in the wake of this year's uprising, Christians are particularly worried about the increasing show of power by ultraconservative Islamists.

"Our protest is peaceful and I don't know why they attack us," said Rami Kamel, a Coptic protest leader.

In recent weeks, riots have broken out at two churches in southern Egypt, prompted by Muslim crowds angry over church construction. One riot broke out near the city of Aswan, even after church officials agreed to a demand by local Salafis, ultraconservative Muslims, that a cross and bells be removed from the building.

Aswan's governor, General Mustafa Kamel al-Sayyed, further raised tensions by telling the media that the church was being built on the site of a guesthouse, suggesting it was illegal.

Kamal, a protester, said the Copts demand the removal of the governor, reconstruction of the church, compensation for people whose houses were set on fire and prosecution of those behind the riots and attacks on the church.

Last week, security forces used force to disperse a similar protest in front of the state television building. Christians were angered by the treatment of the protesters and vowed to renew their demonstrations until their demands are met.