Turkish President Recep Tayyip Erdogan says Turkey won't change its anti-terrorism legislation for the sake of visa-free travel to Europe for its citizens.

Erdogan's statement on Friday came a day after Prime Minister Ahmet Davutoglu, who had negotiated the deal, stepped down over a rift with the president.

Addressing European countries, Erdogan said: "We'll go our way, you go yours."

The EU is asking Turkey to revise its terrorism laws as a condition for allowing Turkish citizens to travel to Europe without visas on short stays. Erdogan has been pressing for a broader definition of terrorism.