Updated

A court in Turkey has scrapped a controversial plan to redevelop Istanbul's Gezi Park that sparked protests which snowballed into deadly nationwide unrest, media reported on Wednesday.

The administrative court justified its ruling, made last month but only revealed by Turkish media on Wednesday, by saying that the "local population" had not been sufficiently consulted about the redevelopment project.

The court also said the plan "violates the preservation laws in force and the identity of the square and of Gezi Park," according to the Zaman and Hurriyet dailies.

Prime Minister Recep Tayyip Erdogan said on June 14, at the height of the protests that left four dead and 8,000 injured, that he would respect the court's decision and ordered a halt to construction work there.

A peaceful sit-in to save Gezi Park's 600 trees from being razed prompted a brutal police response on May 31, spiralling into nationwide outpourings of anger against Erdogan and his ruling Justice and Development Party (AKP), seen as increasingly authoritarian.

The violence has eased since police evicted protesters from Gezi Park on June 15.

But the protests saw some 2.5 million people taking to the streets in dozens of cities across the country in the most serious challenge to Erdogan's rule since the AKP took office in 2002.

The redevelopment plan included building a replica of military barracks from the Ottoman Empire to house a cultural centre, but residents feared the area would in fact become a shopping district.

The Istanbul municipality, controlled by the AKP, embarked on the ambitious project in November.

The plan also aimed to create a pedestrian zone around Taksim square, a traditional venue for rallies and protests as well as a popular tourist spot.

As well as the protests, the project drew criticism from architects, urban planners and ecologists, who saw it as an example of anarchic urbanisation conceived for real estate developers with no consideration for the environment.