The United Nations says the number of displaced within Iraq due to Islamic State group violence and fighting has exceeded 3 million — a grim milestone for the war-battered country.

Tuesday's statement by the International Organization for Migration, or IOM, says at least 3.09 million people have been displaced between January 2014 and June 4 within 18 Iraqi provinces.

It says the majority of the displaced are from Anbar province. More than 276,000 people were displaced over a two-month period between April and June alone amid fighting in Anbar's provincial capital, Ramadi, which eventually saw the city slip out of Iraqi government's control.

IOM also says that over 2 million displaced are housed in private homes while more than 638,000 people have been accommodated in shelters.