Kilis, which lies just a few kilometres from the border with Syria, has been hit by fire from Katyusha-type rockets every day this week raising concerns over its vulnerability.
Two people were killed by shelling from an area controlled by Islamic State (IS) jihadists yesterday and four more rockets hit the town today but caused no injuries, a Turkish official said.
Speaking in Ankara, Prime Minister Ahmet Davutoglu confirmed Turkish troops had hit IS positions in Syria.
Addressing a press conference there, Yilmaz confirmed Turkish artillery hit areas controlled by IS and warned against any further attacks on Turkey.
More From This Section
"If they harm Turkey, they will be subjected to much more," Yilmaz said. "Whoever is friendly with Turkey will find it is to their benefit."
Yilmaz also said the government had established a commission to compensate residents for their losses.
In Ankara, Davutoglu also warned that those who attacked Turkey would pay "the heaviest price", insisting that the government was determined to protect its citizens from the latest cycle of violence.
The violence comes after IS militants wrested back control of the town of Al-Rai near the Turkish border, which rival rebels had captured last week.
Kilis, a town of just under 100,000, is the only major urban centre in Turkey which now has a majority of Syrians after the influx of refugees from the civil war.
Neither the Al-Qaeda-affiliated Al-Nusra Front nor IS are included in a truce brokered by the United States and Russia that came into force on February 27.
In a separate development, Turkey's army opened fire on a group of four people -- one man and three women -- who attempted to cross into the border town of Karkamis late yesterday from IS-held Jarablus in Syria, local media reported.