Updated

Millions of Iraqi students have begun the new academic year a month later than scheduled because thousands of families uprooted from restive areas are sheltering in school buildings.

Education Ministry spokeswoman Salama al-Hassan said Wednesday that students in areas controlled by Sunni militants in western and northern Iraq are not obliged to attend classes, but are allowed to take final exams.

Al-Hassan told The Associated Press that students who cannot attend school can watch lectures on a state-run educational TV channel. She added that only a few schools are still occupied by families and that authorities have set up trailers to be used as classrooms.

The Islamic State extremist group overran much of northern and western Iraq -- including the second largest city Mosul -- earlier this year.