Four men were sentenced to prison Wednesday for their roles in a fiery protest in London against the publication of cartoons of the Prophet Muhammad.

Mizanur Rahman, 24, Umran Javed, 27, and Abdul Muhid 25, were convicted of incitement to murder and sentenced to six years in prison. At a February 2006 protest at the Danish Embassy, they called for the deaths of those responsible for the publication of the cartoons, Judge Brian Barker said.

A fourth defendant, Abdul Saleem, 32, was sentenced to four years in prison for inciting racial hatred.

The defendants, convicted in separate trials, had argued they were venting their rage at the cartoons, which they considered an assault on Islam, and did not intend to incite murder. But Barker called their actions "the complete opposite of peaceful protest."

"No one is entitled to propagate an ideology of destruction and death," he said. "However deep your belief, that is not an excuse for breaking the law."

The four were among up to 300 demonstrators who converged on the embassy, waving placards that read: "Massacre those who insult Islam" and "Prepare for the real holocaust."

Prosecutors said free speech did not extend to inciting murder.

"If you march down the streets of London calling for people to be beheaded and for European cities to be bombed, you have crossed a line," the director of public prosecutions, Sir Ken Macdonald, said in a statement.

Outside the court, demonstrators gathered around Anjem Choudary, the former leader of the outlawed militant group al-Ghurabaa and one of the organizers of the cartoon protest. Yelling into a loudspeaker, Choudary accused the British government of waging a crusade against Islam.

"There is a consequence for nations when they do this type of thing," he said.

Muslims held demonstrations around the world after the publication of the cartoons, which showed the prophet wearing a bomb-shaped turban, clutching a dagger or berating suicide bombers. Islamic law is interpreted to forbid any depiction of the prophet for fear it could lead to idolatry.