UNITED NATIONS (AP) — The U.N. Security Council warned Tuesday that the Islamic State extremist group may be held accountable for crimes against humanity for its systematic persecution of minorities in Iraq.

The council condemned the Islamic State group and associated armed groups "in the strongest terms" for attacking and killing minorities, including Christians, as well as Iraqis who oppose their "extremist ideology."

The radical Islamist militants went on a lightning offensive last month, crossing from territory they hold in Syria and capturing a large swath of northern and western Iraq, in cooperation with local Sunnis who have long distrusted Iraq's Shiite dominated government.

The Security Council said in a press statement approved by all 15 members that the group poses a threat not only to Syria and Iraq "but to regional peace, security and stability."

The council singled out the group's attacks on the strategic city of Tal Afar near the Syrian border, which it seized in June, and neighboring Sinjar, which it captured on Saturday, for condemnation.

It expressed deep concern for the hundreds of thousands of people displaced, many from vulnerable minority communities especially the Yazidis who have lived in the area for hundreds of years.

The Islamic State group issued an ultimatum to tens of thousands of people from the Yazidi community on Saturday to convert to Islam, pay a religious fine, flee their homes or face death. Yazidis follow an ancient religion with links to Zoroastrianism. At least 40 children from those displaced from Sinjar were killed in the violence, UNICEF said Tuesday.

The Security Council said many Iraqis from Tal Afar and Sinjar have been forced to flee and seek refuge "while many others have been executed or kidnapped."

Council members noted that "widespread or systematic attacks directed against any civilian populations because of their ethnic background, religion or belief may constitute a crime against humanity, for which those responsible must be held accountable."

They stressed that all parties, including the Islamic State group, "must abide by international humanitarian law, including the obligation to protect the civilian population."

Iraq's government has been struggling to unite to confront the threat from the extremists, and it has yet to choose a new prime minister.

Council members called on all Iraqi communities "to unite to respond, with the support of the international community, to this violent and senseless threat to Iraq's unity, identity and future."

The council specifically called on all political groups to overcome divisions and work together, and for the country's leaders "to engage as quickly as possible to form a government that represents all segments of the Iraqi population and that contributes to finding a viable and sustainable solution to the country's current challenges."

The Security Council urged all 193 U.N. member states to implement and enforce targeted U.N. financial sanctions, an arms embargo and travel ban on the Islamic State group and associated groups and individuals.