BAGHDAD — Iraq is prepared to intervene militarily if the Kurdish region’s planned independence referendum results in violence, Prime Minister Haider al-Abadi told The Associated Press in an interview Saturday.

If the Iraqi population is “threatened by the use of force outside the law, then we will intervene militarily,” he said.

Iraq’s Kurdish region plans to hold a referendum on Sept. 25 to gauge support for independence from Iraq in three governorates that make up its autonomous region, and in disputed areas that are controlled by Kurdish forces but claimed by Baghdad.

“If you challenge the constitution and if you challenge the borders of Iraq and the borders of the region, this is a public invitation to the countries in the region to violate Iraqi borders as well, which is a very dangerous escalation,” Mr. Abadi said.