Pau Barrena/AFP via Getty Images Barcelona bans all new hotels in city center The mayor’s plan aims to tackle tourist overcrowding.

MADRID — The city council of Barcelona, led by leftist mayor Ada Colau, passed a controversial bill Friday banning all new hospitality establishments in the center and imposing strict limits on new hotels and similar businesses in the whole city.

The city of 1.6 million citizens receives around 30 million visitors a year and locals complain this has led to overcrowded streets and unaffordable property prices.

But Colau's plan, which had been under discussion since March last year, generated fierce opposition from the tourism industry.

The new measure divides the Catalan capital into four areas, each with its own regulations. The first zone, which comprises the historical center, is designated for “natural decrease,” meaning any tourist accommodation that closes down won't be replaced.

New establishments will only be allowed on the outskirts of the city, with the plan setting a limit of 11,000 new beds in the whole of Barcelona — equivalent to 7 percent of current capacity.

After becoming mayor in 2015, Colau froze all new licenses for tourism businesses and launched an all-out assault on unregistered tourism apartments and online companies such as Airbnb.

Colau said in an interview with a local TV station this week that she wants Barcelona to continue to be a tourism destination, but argued that the situation was completely out of control and required action.

Some traditional areas, like the Gothic Quarter, have lost nearly half of their population in the past decade and now host more visitors than permanent inhabitants, according to data provided by city hall.

The plan, which is expected to come into effect in two weeks, was approved with the support of four leftist parties. Centrist and right-wing councilors voted against it.

“This plan is a grave mistake which will have economic and judicial consequences for the city," said Jordi Marti, a councilor from Catalan President Carles Puigdemont's pro-independence party.

Five organizations representing much of the hospitality and retail businesses in the city criticized the plan this week and accused the local government of “demonizing” tourism.

“The effects of the last [economic] crisis in Barcelona would have been much worse without tourism’s contribution. How are we going to manage the next one?” they wrote in a joint statement.