* Rebel spokesman says Kurdish YPG fighters have withdrawn
* Erdogan says centre of Afrin under control
* Turkish and rebel fighters entered Afrin before dawn (Adds Kurdish statement)
ISTANBUL/BEIRUT, March 18 (Reuters) - Turkish forces and their Syrian rebel allies swept into the northwestern Syrian town of Afrin on Sunday, raising their flags in the town centre and declaring full control after an eight-week campaign to drive out Kurdish YPG forces.
A spokesman for the rebel fighters said they entered Afrin before dawn, meeting no resistance. A war monitor, the Syrian Observatory for Human Rights, said pockets of YPG fighters defied orders to withdraw, but Turkish forces were in control.
The fight for Afrin, a once stable pocket of northwest Syria, has opened a new front in Syria's multi-sided civil war and highlighted the ever greater role of foreign powers such as Turkey in the seven-year-old conflict.
Ankara says Syrian Kurdish YPG fighters are an extension of a militant group waging an insurgency inside Turkey, and vowed to crush what it described as a "terror corridor" of YPG-controlled territory along Turkey's southern border with Syria.
It launched its campaign eight weeks ago and has threatened to extend the offensive to another Kurdish-controlled region further east where U.S. forces are stationed alongside the YPG, Washington's ally against Islamic State in Syria.
"Afrin city centre is under control as of 8:30 this morning," Turkish President Tayyip Erdogan told a rally commemorating the World War One Gallipoli campaign, adding that Turkish and Free Syrian Army flags had been raised in the town centre.
"Most of the terrorists have already fled with tails between their legs. Our special forces and members of the Free Syrian Army are cleaning the remains and the traps they left behind," Erdogan said. "In the centre of Afrin, symbols of trust and stability are waving instead of rags of terrorists."
An official from the local Kurdish authority said Kurdish forces were present across the Afrin region and would "strike the positions of the Turkish enemy and its mercenaries at every opportunity."
"Our forces all over Afrin will become a constant nightmare for them," Othman Sheikh Issa, co-chair of the Afrin executive council, said in a televised statement.
STATUE TORN DOWN
A Whatsapp group run by the Kurdish-dominated Syrian Democratic Forces said Turkish and Syrian rebel troops tore down a statue in Afrin, in what it called a "blatant violation of Kurdish people's culture and history".
Turkey's armed forces said that troops were combing the streets for mines and improvised explosive devices.
Free Syrian Army spokesman Mohammad al-Hamadeen said the fighters entered the town from the north, east and west. Kurdish forces had pulled back to Syrian government-controlled areas around the city of Aleppo, or to the Kurdish-held region east of the Euphrates river, he said.
"Maybe (Afrin) will be cleared by the end of the day -- it's empty of fighters, they cleared out," Hamadeen told Reuters.
Turkey's government spokesman Bekir Bozdag said the military campaign would continue to secure areas around Afrin and make sure food and medicine were available.
"We have more to do. But the project of building a terrorism corridor and building a terrorist state is over," he said.
The World Food Programme said it was distributing food to 25,000 people in the nearby towns of Nubl and Zahra, including people just arriving from Afrin.
More than 150,000 people fled Afrin in recent days, the Syrian Observatory said, as Turkey pressed on with its campaign despite a U.N. Security Council call for a 30-day ceasefire across Syria.
Ankara said the demand did not apply to Afrin, but its operation has faced criticism in the West.
France's foreign minister said Turkey's concerns for its border security did not justify "the deep incursion of Turkish troops in the Afrin zone", which could also weaken international action against remaining Islamic State fighters in Syria.
France, like the United States, has given arms and training to a YPG-led militia in the fight against Islamic State in Syria, and also has dozens of special forces personnel based in the region. (Additional reporting by Yesim Dikmen and Irem Koca in Istanbul, Suleiman al-Khalidi in Amman and Stephanie Nebehay in Geneva, Editing by Angus MacSwan and Richard Balmforth)