Turkish soldiers clearing mines came under fire on Thursday from Islamic State (ISIS) group-controlled territory across the Syrian border, Turkey's Dogan news agency said.
There were no casualties, the agency said, but stray bullets hit buildings near the border crossing in the southeastern town of Karkamis. Turkish artillery and tanks returned fire.
Turkey has increasingly become a target for the militant group, which is blamed for a suicide bombing in central Istanbul this month that killed 11 tourists and two attacks in 2015 which left more than 130 dead.
Washington and Ankara have been discussing for months how to seal a last 98-kilometre (60-mile) stretch of border that has served as a thoroughfare for Islamic State fighters, black-market goods and war materiel.
A member of the US-led coalition against ISIS, NATO member Turkey has long been criticised by the West for loose border controls said to have allowed thousands of foreign jihadists to travel to Syria.
Residents in villages near Karkamis earlier this week said the border strip was quiet after weeks of gunfire and artillery exchanges. Turkish tanks have bombarded ISIS State positions on the Syrian side of the border since the suicide attack on Jan. 12.