London has been knocked from its perch as the world’s most expensive city to live and work in after Britain’s vote to leave the European Union.

The U.K. capital is now third behind New York and Hong Kong, according to research on global cities from property broker Savills . The research examines the costs for an employee to live in rented housing and work in an office for a year.

London had spent the last 2½ years at the top. But it fell in July because of the drop in sterling against the dollar and cooling U.K. real-estate markets, both of which accelerated after the EU referendum in June.

“Brexit has made London more competitive, at least in terms of cost,” said Yolande Barnes, head of world research at Savills. “Of course, other factors might mean it won’t be.”

Following years of booming property values, London commercial real-estate prices have been falling, after having slowed before Brexit, while house prices in expensive neighborhoods have been declining for more than a year. Meanwhile, in New York real-estate rents have increased marginally, Ms. Barnes said.