Good news Londoners, Stockholmers, and San Franciscans: Vancouver may have solved one of your toughest problems. Last year, the Canadian city topped UBS’s Global Real Estate Bubble index, a ranking of cities most at risk of being in a property bubble; the bank said Vancouver’s housing market was in “overdrive.” But in the last four months, house prices have taken a marked turn downwards.

Residential property sales dropped a staggering 39.5% in January compared to a year ago, according to the Real Estate Board of Greater Vancouver. With 1,523 properties sold in the region, that was also an 11% decrease from December, a report this week showed.

The drop in sales is pulling down prices. A house price index by the Canadian Real Estate Association puts the benchmark property price at C$896,000 (US$688,000), down 3.7% in the past six months. Still alarmingly expensive, but at least improving.

So how did Vancouver tame its roaring housing market? A weakening Canadian dollar had been increasing demand from foreign buyers, while central bank stimulus kept interest rates low and pushed up the number of mortgages. But last August, British Columbia imposed a 15% tax on foreign home buyers.

It’s working (pdf), according to Bank of Montreal analysts. They show how prices have been falling in Vancouver but are still appreciating steeply in Toronto and Victoria, which don’t have a similar tax. Additionally, the federal government introduced new rules in October that made it harder for first-time buyers to get a mortgage.

Royal LePage, a real-estate company, forecasts house prices will drop 8.5% in 2017. It argues that an important reason for the fall in sales isn’t just the foreign buyers’ tax, but that locals have stopped putting their homes up for sale simply because they can’t find affordable alternatives.

Of course, what worked for Vancouver may not work everywhere—and indeed, if other cities adopt such a foreign buyers’ tax, it may end up putting even more pressure on the markets of cities that don’t. Still, it shows that there are ways to bring a runaway market under control.