* Police raid comes hours after Erdogan warning
* Protesters had vowed to keep up their campaign
* Injured carried by stretcher from the park (Adds quotes, scene around park)
By Ece Toksabay and Ayla Jean Yackley
ISTANBUL, June 15 (Reuters) - Turkish riot police stormed a central Istanbul park on Saturday firing tear gas and water cannon to evict hundreds of anti-government protesters, hours after an ultimatum from Prime Minister Tayyip Erdogan.
Lines of police backed by armoured vehicles sealed off Taksim Square in the centre of the city as officers stormed the adjoining Gezi Park, where protesters had been camped in a ramshackle settlement of tents.
Erdogan had warned hours earlier that security forces would clear the square, the centre of more than two weeks of fierce anti-government protests which spread to cities across the country, unless the demonstrators withdrew before a ruling party rally in Istanbul on Sunday.
"We have our Istanbul rally tomorrow. I say it clearly: Taksim Square must be evacuated, otherwise this country's security forces know how to evacuate it," he told tens of thousands of flag-waving supporters at a rally in Ankara.
Panicked protesters fled into an upscale hotel at the back of the park, several of them vomiting, as clouds of tear gas and blasts from what witnesses said were percussion bombs - designed to create confusion rather than injure - engulfed the park.
Residents in surrounding neighbourhoods took to their balconies or leaned out of windows banging pots and pans, their clatter rising above the wail of ambulance sirens, while car drivers sounded their horns in support of the protesters.
Several people were brought out of the park on stretchers to waiting ambulances, while families with young children fled into side streets from a main shopping street leading to the square.
A similar police crackdown on peaceful campaigners in Gezi Park two weeks ago provoked an unprecedented wave of protest against Erdogan, drawing in secularists, nationalists, professionals, trade unionists and students who took to the streets in protest at what they see as his autocratic style.
The unrest, in which police fired tear gas and water cannon at stone-throwing protesters night after night in cities including Istanbul and Ankara, left four people dead and about 5,000 injured, according to the Turkish Medical Association.
The protesters, who oppose government plans to build a replica Ottoman-era barracks on Gezi Park, had defied repeated calls to leave but had started to reduce their presence in the park after meetings with Erdogan and the local authorities.
"This is unbelievable. They had already taken out political banners and were reducing to a symbolic presence in the park," Koray Caliskan, a political scientist at Bosphorus University told Reuters from the edge of Gezi Park.
TAKEN BY SURPRISE
Erdogan told protesters on Thursday that he would put the building plans on hold until a court rules on them. It was a softer stance, after two weeks in which he called protesters "riff-raff" and said the plans would go ahead regardless.
But at the first of two rallies this weekend by his ruling AK Party, he reverted to a defiant tone, telling tens of thousands of flag-waving supporters on the outskirts of Ankara that he would crush his opponents at elections next year.
He called for unity among Turks and accused foreign forces, the main opposition Republican People's Party (CHP), international media and market speculators of stoking unrest and trying to undermine the economy.
The police intervention so soon after Erdogan spoke took many by surprise on a busy Saturday night around Taksim, one of Istanbul's main social hubs, not least after President Abdullah Gul, who has struck a more conciliatory tone than Erdogan, said earlier on Saturday that talks were progressing well.
"The fact that negotiation and dialogue channels are open is a sign of democratic maturity ... I believe this process will have good results. From now on, everybody should return home," Gul had said on his Twitter account.
What began as a campaign by environmentalists to save what they say is one of central Istanbul's few remaining green spaces spiralled into the most serious show of defiance against Erdogan and his AK Party of his decade in power.
Erdogan has said the AK Party rallies in Ankara and Istanbul are meant to kick off campaigning for local elections next year and not related to the protests, but they are widely seen as a show of strength in the face of the demonstrations.
"I've come here for one reason: to support Tayyip, to support AKP. What is happening in Taksim is just shameful. It's being carried out by marginal groups, you've seen the PKK (Kurdish) flags up there," said Menderes Kan, 46.
Erdogan has long been Turkey's most popular politician, his AK Party winning three successive election victories, each time with a larger share of the vote, but his critics complain of increasing authoritarianism.
"At the beginning I felt sympathy towards those in Gezi Park and I thought our prime minister's tone was too harsh. But now the protests there have turned into something else," said Sumeyye Erdogmus, a 22-year-old nurse.
"Nothing can justify behaviour like cursing the prime minister's mother and burning buses. This is anarchy, and today we are here to show that our prime minister is not alone." (Additional reporting by Seda Sezer in Istanbul, Jonathon Burch and Humeyra Pamuk in Ankara; Writing by Nick Tattersall; Editing by Andrew Roche)