A Muslim cleric in England has been given a 6½-year prison sentence for backing the Islamic State extremist group and encouraging terrorism through his sermons.

Police secretly recorded 40-year-old Kamran Hussain last year giving sermons in which he told children that martyrdom was better than school.

Judge Rebecca Poulet said that Hussain preached "hatred and division" when she sentenced him on Thursday at London's Old Bailey courthouse.

Hussain claimed during his trial that he was exercising his right to free speech, but he was found guilty of supporting IS and encouraging terrorism.

The judge said the sermons represented a serious, persistent advocacy of terrorism.

Hussain preached at a charity-funded mosque in Stoke-on-Trent, a city 155 miles (250 kilometers) northwest of London.