DUBLIN has long been a popular destination for foreign tourists, who enjoy its warm pubs, silky beer, Georgian streetscapes and leisurely approach to life. But lately it seems that longer-term visitors have been falling out of love with Ireland’s lively capital.

Last month a survey of 13,000 expatriates put Dublin fifth from bottom of a list of 51 global cities, ranked by quality of life. Their main gripe (as with Paris, which finished two places lower, sandwiched between Riyadh and Jeddah) was not a sudden collapse in the city’s charm, safety or amenity but its high cost of living, and in particular the difficulty of finding somewhere to stay.

According to a recent report by WorldFirst, an international-payments firm, Luxembourg is now the only European country where renting a home is pricier than it is in Ireland. Daft.ie, an Irish property website, reported last month that the average monthly rent in central Dublin is now €1,819 ($2,155)—more than 60% of Ireland’s average pre-tax private-sector income. Citywide, rents rose by 12.3% in the year to September, and are now 23% higher than at the peak of the “Celtic Tiger” property bubble in 2008, which spectacularly burst. Since then Ireland’s headline economic figures have steadily recovered, bringing rents and house prices with them.

With the cost of housing shooting up, even reasonably well-paid working people are being priced out of Ireland’s urban markets. Homelessness is soaring; in Dublin the number of registered homeless people has increased at least fourfold in the past three years, and two rough-sleepers have died in the past week. Many more are couch-surfing, commuting huge distances or moving back in with their parents.

This new housing crisis is embarrassing at a time when Ireland is touting for jobs and businesses fleeing Brexit Britain. Threshold, a housing-support charity, says it is being contacted by desperate foreign firms seeking help with finding homes for would-be immigrant employees.

Whereas the 2008 bubble was caused by a credit-fuelled glut of new housing, the current crisis stems from a famine. Starting in the 1980s, successive centre-right governments encouraged local authorities to sell off social housing, which has not been replaced. The private construction sector has so far failed to increase supply in response to soaring demand. Experts estimate that around 50,000 new units are needed each year to ease the shortage. But a recent report from Goodbody, a stockbroker, showed that only 5,377 new privately built units were completed in 2016.

The reasons behind this market failure are various. One of them is more cautious banks. Developers also complain that Irish construction costs are mysteriously high—“40% higher than Amsterdam”, estimates Ronan Lyons, an economist at Trinity College Dublin. Red tape, suspected cartels among materials suppliers and the high fees extracted by closed-shop Irish professionals could be partly to blame. Unwise tax breaks have encouraged land hoarding, and private developers have little incentive to drive down their margins by increasing supply.

Stung by mounting criticism of its lack of an emergency plan to build more houses, Ireland’s centre-right government seems tempted to try to bluster it out. Leo Varadkar, the prime minister, recently stated that Ireland’s homeless figures were quite good by international standards, citing numbers which fact-checkers quickly called into question as incomplete and out of date.

But playing down the scale of the problem is a risky strategy for Mr Varadkar. His minority government depends on a deal with the opposition, and he only narrowly averted its collapse over a police scandal by sacrificing his deputy this week. Polls suggest that the housing crisis, together with a tottering health service, will be at the heart of the next election campaign. And an election now looks as though it will come sooner rather than later.