ISTANBUL (AP) — Turkey’s president said Sunday the Turkish military and allied Syrian forces have taken “total” control of the town center of Afrin, the target of a nearly two-month-old offensive against a Syrian Kurdish militia, which said fighting was still underway.President Recep Tayyip Erdogan said the Turkish flag and the flag of the Syrian opposition fighters have been raised in the town, previously controlled by the Kurdish militia known as the People’s Defense Units, or YPG.“Many of the terrorists had turned tail and run away already,” Erdogan said in a speech in western Turkey.Turkey views the Kurdish forces in the Afrin enclave along the border as terrorists linked to the outlawed Kurdistan Workers’ Party, or PKK, which has waged a decades-long insurgency within Turkey’s borders.Ankara launched the operation, codenamed Olive Branch, against the town and surrounding areas on Jan. 20, slowly squeezing the militia and hundreds of thousands of civilians into the town center. Forty six Turkish soldiers have been killed since then.A Kurdish official, Hadia Yousef, said the YPG was still fighting inside the town, but had evacuated the remaining civilians because of “massacres.” But Salih Muslim, a senior Kurdish official living in exile in Europe, tweeted that Kurdish fighters had withdrawn, saying “the struggle will continue and the Kurdish people will keep defending themselves.”The Britain-based Syrian Observatory for Human Rights said nearly 200,000 people have fled the Afrin region in recent days amid heavy airstrikes, entering Syrian government-held territory nearby. Syrian State TV on Sunday broadcast footage of a long line of vehicles and civilians on foot leaving Afrin. Erdogan has said the people of Afrin will return.Turkey’s military meanwhile tweeted that its forces are now conducting combing operations to search for land mines and explosives. Government spokesman Bekir Bozdag tweeted that Turkey would take steps to restore daily life and ensure access to food and health care. “Our job is not done yet, we have a lot more work. But terror and terrorists in Afrin are over,” he said.The army posted a video on social media showing a soldier holding a Turkish flag and a man waving the Syrian opposition flag on the balcony of the district parliament building with a tank stationed on the street. The soldier called the capture a “gift” to the Turkish nation and to fallen soldiers on the anniversary of a famous World War I victory.Turkey is marking the 103rd anniversary of the battle of Gallipoli, where the Ottoman Empire repelled an invasion by Allied forces after several months of heavy fighting.Footage by Turkey’s private Dogan news agency showed Syrian fighters shooting in the air in celebration.In another Dogan video, a Syrian fighter is seen shooting at a statue symbolizing the Kurdish new year celebrations that are also being held this week, before a bulldozer attempts to pull it down. The statue is of Kawa, a mythological hero in Iran’s Zagros mountains who defeated a brutal ruler and lit fires to spread the news, ushering in spring.The YPG has been a key U.S. ally in the fight against the Islamic State group, and seized large areas across northern and eastern Syria from the extremists with the help of coalition airstrikes. Relations between NATO allies Turkey and the U.S. have been tense over the latter’s support of the YPG.Erdogan has repeatedly said that Turkey will not allow a “terror corridor” along its border. Turkey launched an earlier cross-border operation in 2016 to clear an area in northern Syria of IS and the YPG, preventing the Kurdish group from linking Afrin with the much larger territories it holds to the east.Turkey also fears the establishment of a Kurdish self-ruled zone in Syria that could inspire its own Kurdish minority to press for greater autonomy. A peace process with the PKK collapsed in 2015, reigniting a conflict that has killed tens of thousands over more than three decades.The Kurds are the largest stateless ethnic group in the Middle East, with some 30 million living in an area split between Iran, Iraq, Turkey and Syria.—El Deeb reported from Beirut.