Beijing, like many of the planet’s largest cities, can seem like a dystopian hellscape. The city sprawls to accommodate its 21 million people or so. Buildings are erected and knocked down in the span of a few months, the product of unchecked economic development. Pollution chokes the air, rendering it smoggy as it drifts between the skyscrapers.

Recently, the Chinese government decided that these problems are the product of overpopulation. So the country has decided to put a cap on population in two of its biggest cities, Beijing and Shanghai, in an effort to contain the number of residents to 23 and 25 million respectively, by 2035.

The logic is sound. Fewer people mean less air pollution, greater access to medical services and public transportation. Overall, people will be happier and healthier if there are fewer of them.

As part of the plan, China Daily reports, the Beijing Municipal People’s Congress is working on meteorological disaster prevention, building affordable houses and encouraging the use of non-motorized vehicles.

In reality, though, rural migrants that move to the city looking for higher wages and a better lives are the ones that suffer.

Authorities have cracked down on illegal housing, unregistered shops, and street vendors and shops. This has already driven tens of thousands of domestic migrants out of Beijing, stripping some of the most popular neighborhoods of their history and culture. Choking red tape restricts access to schools for the children of migrants, who must present a special ID, called hukou, tied to their parents’ birthplace. According to Chu Zhaohui, research fellow at the Chinese National Institute of Education Sciences, who spoke with the Toronto Star, the so-called “Five Documents System” leaves 30 percent of migrant students, or children of migrants, out of Beijing’s public schools.

It’s already working. According to The Guardian, Beijing’s population dropped by 20,000 between 2016 and 2017. Shanghai’s population was also down by 10,000.

Families are forced to split up. Children are brought back to rural areas where they can access schools, while the parents keep working in the big city where the wages are higher. And as the new measures push the poor away, cities become increasingly inhospitable for the low-income workers that remain.

“This urban gentrification is not a good thing for the city,” Yan Song, director of the University of North Carolina’s program on Chinese cities, told The Guardian. “The demand and the need for the lower end of services will still exist, but those people will just live further and further away from the city centre, and have to spend longer getting to work.”

Reducing congestion in the world’s biggest cities is an important goal, especially because urbanization is poised to become unmanageable in many parts of the world. But keeping poor people out isn’t the way to do it. Inequality doesn’t bring growth — it exacerbates instability. Engineering an unequal society may help solve a short term problem, but it will likely create a much bigger one down the line.