The phrase “Bizim bleibt,” or “Bizim stays” became a rallying cry for the wider movement and gave birth to the Bizim Kiez organization, which is fighting to maintain diversity in the neighborhood.

After tenant outcry, the city also saved at least two apartment blocks in Friedrichshain-Kreuzberg from being sold, using a legal tool known as the “right of first refusal,” which lets officials intervene if they can find funding for the purchase. In another case, the city recently stepped in and purchased a large disused freight station in the eastern district of Köpenick, which it plans to convert into affordable housing.

But like the “right of first refusal” rule, which depends on flush state funding, many of the anti-gentrification measures have limitations. The system of rent caps, which forbids landlords to charge more than 10 percent above the district average for a new rental contract, has many exceptions and loopholes. Often, landlords simply ignore it.

“People are happy if they find an apartment in the city they can afford,” said Ms. Werner of the tenants’ association. “It’s not the first thing they do to enter into a conflict with their landlord.”

More effective are the so-called milieuschutz laws, translated as “social environment protection,” meant to prevent landlords from imposing expensive renovations that would effectively price out the current tenants. Today, there are more than 30 milieuschutz zones in Berlin, with more expected, though the protections are not ironclad. These zones prevent landlords from converting rental apartments to condos — unless they promise to sell only to current tenants for a period of seven years.

“But then it’s very probable the landlord will try to kick out the tenants and sell the condos for lots of money,” Ms. Werner said. “We think the transition from rental to condos should be forbidden totally.”