* Greece says migrants will not be let in
* Says attempt to breach its borders was 'organised'
* Turkey says thousands have left country (Adds detail, includes Bulgaria, colour)
By Lefteris Papadimas
KASTANIES, Greece, Feb 29 (Reuters) - Greek police fired teargas to push back hundreds of migrants gathered on its border with Turkey on Saturday, as a crisis over Syria shifted onto the European Union's doorstep.
Greece, which has tense relations with its neighbour Turkey at the best of times and was a primary gateway for hundreds of thousands of asylum seekers in 2015 and 2016, described the situation an "onslaught" and said it would keep migrants out.
"Greece yesterday faced an organised, mass and illegal attempt to violate its borders and it withstood this attempt," government spokesman Stelios Petsas told reporters.
"The government will do whatever it takes to protect its borders," adding that police at the borders would be reinforced.
Ankara said on Thursday it will no longer contain hundreds of thousands of asylum seekers after an air strike on war-ravaged Idlib in Syria killed 33 Turkish soldiers.
Almost immediately, convoys of people appeared heading towards the Greek land and sea borders.
"This has nothing to do with Idlib," Petsas said, adding that in the past 24 hours Greek authorities had prevented attempts by 4,000 people to cross the border.
Turkish President Tayyip Erdogan said on Saturday that some 18,000 migrants had crossed borders from Turkey into Europe. Speaking in Istanbul, he did not immediately provide evidence for the number, but said it would rise.
Bulgaria, which also shares a border with Turkey, said it had seen no migrant inflows.
"There is nothing different on our border from what we have seen a year, or two or three years ago," Prime Minister Poyko Borissov told reporters.
A Reuters witness said there were about 500 people in the buffer zone between the Greek and Turkish border posts, and beyond that on the Turkish side, at the Pazarkule border gate, hundreds more.
Overnight, demonstrators hurled flaming pieces of wood at police, amateur footage filmed by a policeman on the scene, which was seen by Reuters, showed. Police fired teargas to keep people back.
An estimated 3,000 people had gathered on the Turkish side of the border at Kastanies, a Greek government official said. Kastanies is just over 900 km (550 miles) north-east of Athens.
"We are making a titanic effort to keep our borders closed to such migration flows," Panagiotis Harelas, head of border guards in the area, told reporters, showing empty gas cannisters which were hurled from the Turkish side. They had Turkish writing on them.
Nearly a million refugees and migrants crossed from Turkey to Greece's islands in 2015, setting off a crisis over immigration in Europe, but that route all but closed after the European Union and Ankara agreed to stop the flow in March 2016.
Greece shares a long river border with Turkey, and is a known permeable route for asylum seekers.
Reuters video showed tens of people at a time climbing, and some throwing their bags over a 3-metre (10-foot) fence covered all over with barbed wire along the Greek border in Turkey's western Edirne province.
A group of Afghans with young children waded across fast-moving waters of the Evros river and took refuge in a small chapel. They crossed into Greece on Friday morning.
"Today is good" said Shir Agha, 30 in broken English. "Before, Erdogan people, police problem," he said. Their shoes were caked in mud. It had rained heavily the night before, and by early morning, temperatures were close to freezing.
Greece had already said on Thursday it would tighten border controls to prevent coronavirus reaching its Aegean islands, where thousands of migrants are living in poor conditions.
A Syrian man, who did not give his name, said they had been in the border area for two days and were in need of food.
"We've been here for two days, We have no food, look at these kids," he said. (Additional reporting by Ali Kucukgocmen in Istanbul, Tsvetelia Tsolova in Sofia, Bulent Usta in Pazarkule Writing by Michele Kambas Editing by Alexander Smith and Frances Kerry)
Our Standards: The Thomson Reuters Trust Principles.