"We do not advocate war but we are not far from it," he said.
He warned that those who are trying to put Turkey's "deterrence policy" to the test are making a "deadly mistake".
"We are not bluffing - we will stand by our course whatever it takes," Erdogan said.
He warned Syrian President Bashar al-Assad against "testing Turkey's patience".
The Turkish parliament has authorised military action inside Syria.
Erdogan said the authorisation was purely deterrent but he also warned against doubting his country's resolve.
Lawmakers passed a bill by 320-129 vote, authorising troops to launch cross-border operations against Syria and strikes against Syrian targets for a period of one year in response to Syria's deadly shelling of a Turkish town.
The UN has condemned the attack from Syria "in the strongest terms". A statement by the Security Council called on the Syrian government to "fully respect the sovereignty and territorial integrity of its neighbours".
Ankara: Turkey does not want a war with Syria but cannot rule out armed conflict, Turkish Prime Minister Recep Tayyip Erdogan said.
First Published: Saturday, October 06, 2012, 09:26