Turkish forces retaliated immediately, destroying targets in the Idlib region, the ministry said in a written statement, without elaborating on how its military struck back.
Syrian President Bashar al-Assad's forces, backed by Russian air power, have recently made advances in Idlib and President Tayyip Erdogan said on Friday Turkey may launch a military operation there unless the fighting is halted.
Turkey, which already hosts 3.6 million refugees from Syria, fears a fresh wave of migrants from Idlib. It has 12 military observation posts around the region, set up under a 2017 agreement with Russia and Iran. Several of them have since been surrounded by advancing Syrian government forces.
The shelling by Syrian government forces was carried out "against our elements sent as reinforcements to prevent clashes in Idlib, despite their positions being coordinated beforehand," the Turkish defense ministry statement said.Idlib is the last major rebel-held stronghold in Syria's nearly nine-year war and Erdogan accuses Russia of violating agreements to reduce the fighting in the region, a charge which Moscow denied on Friday.