ISTANBUL — A meeting between Turkey's prime minister and representatives of anti-government protesters ended early Friday without a clear resolution on how to end the occupation of a central Istanbul park that has become a flashpoint for the largest political crisis of his 10-year rule.

The talks between Prime Minister Recep Tayyip Erogan and the protesters were an effort to resolve a sit-in at Taksim Square's Gezi Park without resorting to a police intervention to clear out the demonstrators.

Erdogan on Thursday told the protesters he was giving them a "final warning" to leave the park. Although the late-night talks ended on what both sides indicated was a positive note, the possibility remained that protesters would refuse to leave and the police would be sent in to clear them out.

A violent police crackdown on May 31 against a small environmental protest aiming to prevent a development project at the park sparked protests that spread to dozens of cities across Turkey. Since then, hundreds and often thousands of people have set up camp in the park.

The demonstrations have morphed into a broader protest against what many say is the prime minister's increasingly authoritarian style and his perceived attempts to impose his religious and conservative views on a country with secular laws — charges Erdogan strongly rejects.

Nationwide, five people, including a police officer, have died and more than 5,000 protesters and 600 police have been reported injured in clashes.

Speaking after the overnight meeting, Huseyin Celik, spokesman for Erdogan's Justice and Development Party, said construction work at the park would be frozen until a pending court decision is issued on whether the work is legal. A referendum could be held on the future of Gezi Park after that, he said.

Representatives from Taksim Solidarity, a group that has been organizing much of the activity in the Gezi occupation, said they had been promised the construction at the park would be frozen, and said they would take the meeting's conclusions back to the protesters later Friday.

It was unclear what the response would be. Although Taksim Solidarity has emerged as the most high-profile group in the occupation, it does not speak for everyone camping in the park. Many say they have no affiliation to any group or party.

The prime minister has maintained a hard line against the demonstrations, angrily denouncing the protesters as looters and vandals. He has said the unrest was instigated by a variety of interests, including foreign media and interest rate lobbies intent on destroying Turkey's international reputation and halting its economic growth.

As Erdogan held talks in the capital, Ankara, Istanbul's governor hosted a meeting through the night with any protesters who cared to join him at a cafe near Taksim Square — vowing to consult with them "until the morning if necessary" on finding a solution to the sit-in.

"I hope this meeting will be a message to youngsters from different ages in Gezi Park ... we are trying to end this issue without (police) having to intervene," Huseyin Avni Mutlu told reporters on the way in.

In the park and on Taksim Square, thousands gathered in a peaceful, festive show of defiance earlier in the night, many dancing to tunes played on a grand piano delivered to the square on a truck. But in Ankara, a demonstration by hundreds of protesters rallying in sympathy with the activists turned violent, with police firing tear gas and rubber bullets.

On Thursday, Erdogan gave his starkest warning yet that the protests, which have trained an unflattering spotlight on his Islamic-rooted government, must end.

"We have arrived at the end of our patience," said Erdogan, who urged parents whose children were in the park to persuade them to leave.

Earlier this week, riot police armed with tear gas, water cannon and plastic bullets moved into Taksim Square and cleared it of protesters and banners in a day-long operation as groups of demonstrators fought back with stones, firebombs, bottles and fireworks.

Although the vast majority of the thousands camping in the park have been peaceful, police also fired dozens of rounds of tear gas among the tents. Volunteers at a makeshift infirmary said hundreds were treated for injuries or the effects of tear gas.

As the domestic and international outcry has grown against the police tactics, Erdogan has sought to present a somewhat more pragmatic side, offering to hold a referendum on construction project that would replace the park with a replica of Ottoman-era barracks.

Inside the park, which has turned into a burgeoning tent city complete with a library, a food distribution center, an infirmary, a children's activity center and a plant nursery, many scoffed at the prime minister's tactics and language, insisting Erdogan was turning a deaf ear to the roughly half of Turks who didn't vote for him when he was re-elected in 2011.

"Each of us is already an independent individual, may be also a father or a mother. My mom and dad do not think that there is an objection for being here," said demonstrator Hasan Husein Karabulut.

Erdogan also lashed out Thursday at the European Parliament over a non-binding resolution expressing concern over "the disproportionate and excessive use of force" by Turkish police against the demonstrators.

The EU assembly said it "deplores the reactions of the Turkish government and of Prime Minister Erdogan" — and accused him of driving both sides further apart.

"I won't recognize the decision that the European Union Parliament is going to take about us!" Erdogan said shortly before the vote, drawing raucous applause from his party members. "Who do you think you are by taking such a decision?"