Turkey's military returned fire at ISIS targets in northern Syria on Tuesday, after two mortar shells from Syria hit a Turkish border town, Turkish broadcaster NTV said, citing the military.

The military fired 40 shells at four ISIS targets in Syria, NTV said. The two mortar shells, which hit the town of Karkamis but did not cause casualties, were apparently fired during clashes between Syrian rebels and ISIS militants in northern Syria, state-run Anadolu Agency said.

Karkamis neighbours the Syrian town of Jarablus, which Turkish-backed Syrian rebels are preparing to attack and seize from ISIS, according to a senior rebel official, a move that would frustrate Kurdish hopes to expand there.

The mortar shells hit the garden of a property linked to a mosque in Karkamis after striking power lines, Anadolu said. Security forces subsequently sealed off the area and warned people over loudspeaker to stay at home, it said.

On Monday, Turkey's military launched artillery attacks on ISIS while artillery pounded Kurdish YPG militants in Syria, whom Ankara sees as an extension of its own Kurdish insurgency.