Turkish President Recep Tayyip Erdogan has warned the Islamic State group will suffer heavy losses if it continues attacking Turkey.

Erdogan said Tuesday that no attack against Turkey's territory and its citizens would go unpunished.

The Turkish military is pounding IS targets in northern Syria in response to a months-long rain of rocket attacks concentrated on the Turkish border town Kilis.

Erdogan said IS "has suffered its greatest casualties through its operations against Kilis and will suffer even more casualties if they continue."

Since January, projectiles fired from Syria have claimed 20 lives in Kilis, a town where Syrian refugees outnumber the Turks.

The Turkish military says dozens of IS fighters have been killed in retaliatory artillery fire and air strikes launched from Turkey.