Turkish forces and allied Syrian rebels are now in control of Jandaris, a town in Afrin district of northern Syria, the state-run Anadolu news agency says.

Turkey's military alongside Free Syrian Army allies have seized control of the second most populated town in the district from Kurdish People's Protection Units (YPG) fighters after capturing a hill overlooking the town a day earlier, it said on Thursday.

Jandaris is about 20km away from central Afrin, the last major YPG outpost.

"The entire city of Jandaris was liberated from the secessionist gangs. The fight will continue until the whole of Afrin is cleared of them," an FSA commander who goes by the name of Abu Saleh said.

Speaking in Vienna, Mevlut Cavusoglus, Turkey's foreign minister, said the military operation in Syria against the Syrian Kurdish group should end by May.

Al Jazeera's Allan Fisher, reporting from the Turkish-Syrian border, said fighting could still be under way in Jandaris.

"Despite the bravado, they may not have complete control yet. Sporadic fighting is reported to be continuing in the town," he said.

"The battle for Afrin may not be as quick or straightforward. The Kurds are moving 1,700 fighters across the country away from the battle against ISIL on to the front lines of the coming assault."

Turkey has rejected international calls for it to suspend the Afrin assault in line with a UN ceasefire for Syria, which does not apply to ISIL, al-Qaeda and groups associated with it, or others deemed "terrorists" by the UN Security Council.

Turkey considers the YPG an extension of the Kurdistan Workers' Party (PKK), which launched a decades-old fight against Ankara's rule.

YPG has been an important ally to the United States in the fight against ISIL (the Islamic State of Iraq and the Levant, also known as ISIS).