DUBLIN — With its economy growing again after almost a decade in the doldrums, Ireland is eager to attract bankers, software engineers and accountants to its shores. But there’s a problem: finding them somewhere to live.

A housing shortage, compounded by ropy infrastructure, limits Ireland's appeal — just as companies are looking for alternative locations to the U.K. after Brexit.

The issue is a major early challenge for new Prime Minister Leo Varadkar and his fragile minority government, which faces public anger over rocketing property prices, repossessions (or foreclosures) and record levels of homelessness. His Fine Gael party is also on the back foot over previous interventions that may have made the problem worse.

The ability of the country, still scarred by economic crisis, to poach business from its closest neighbor after Brexit is crucial to compensate for damage already being inflicted on sectors that are strongly reliant on exports to the U.K.

Ireland’s agency for attracting foreign direct investment, IDA Ireland, received more than 80 inquiries from firms considering moving staff to Dublin in the wake of Britain's decision to leave the EU. The agency says it has confirmed deals with over a dozen London-based banks and firms to move some operations to Dublin as of last month, as it battles against continental rivals Amsterdam, Frankfurt and Paris to clinch relocations.

Any workers that come with them, however, will be heading straight into a housing crisis.

Charles Benon, a 30-year-old French IT engineer with Swedish multinational Ericsson, battled through queues of up to 30 people to find an apartment to rent.

He even tried to buy a flat but was dissuaded after a property he bid on went for 35 percent more than the asking price.

He now shares a €1,700-a-month Dublin apartment with his girlfriend, a fellow IT engineer, but worries about whether their tenancy is secure. Struggling to imagine a future in Ireland, the couple is trying to relocate to Spain.

“We have good salaries. We are among those with the least to complain about,” Benon said, adding that it was not uncommon in his social circle for couples to rent a room together in a shared flat.

“I live in the city center. I can see cranes everywhere. But most of the new buildings being built are offices. The question I would like to ask the people in charge of this is: Where do they expect to put the people?”

Boomtime hangover

The last time houses were this expensive in Ireland, it was a due to a property bubble, inflated by a glut of credit before it burst in the global economic crisis of 2007-2008.

The problem this time is different: a shortage of housing stock.

When Ireland’s banks crashed a decade ago along with the property market, new building ground to a halt. There was no new construction between 2011 and the start of 2014, according to NAMA, the state body that absorbed bad debts after the crisis.

About 10 percent of the population live in homes with more people in them than rooms.

The crash caused tradesmen to emigrate en masse, put a generation of property developers out of business or on ice as their debts were worked out, and permanently broke their old funding model of large cheap loans upfront.

In the meantime, Ireland’s population kept growing, with one of the highest fertility rates in the EU. It rose 3.7 percent nationally between 2011 and 2016, according to census data, and by 5.8 percent in Dublin as more people moved to the city.

Each year, the shortage of housing grew, rising to a deficit of homes of more than 50,000 by 2015.

The average household size grew for the first time in decades between 2011 and 2016, as larger numbers of people shared properties and adult children bunked in with their parents. About 10 percent of the population live in homes with more people in them than rooms, according to the 2016 census.

Now, commercial building has returned to profitability and construction sites are proliferating in Dublin. But for a complex range of reasons — landowners not selling their land as they hold out for higher prices, financing difficulties, regulations with unintended side effects — homes are being built at a rate that can satisfy only a fraction of current demand, let alone clear the backlog.

“Demand, even without people coming into the country, is much stronger than supply, just based on the existing population,” said NAMA CEO Brendan McDonagh.

McDonagh estimates house completions to be running at a rate that is currently enough to meet about half of demand. A study by property website daft.ie puts it at a quarter.

Boxed in

Particularly in Dublin, the shortage is compounded by the limitations of infrastructure, which is showing the strain of the years of austerity that followed the crash.

It was Varadkar, then transport minister, who announced in 2011 that major road and rail projects would be frozen, and investment in transport halved by 2016. As the new prime minister, or taoiseach, he is now facing the consequences.

Strategically important projects — a metro link to Dublin airport, currently unusual for a European capital in having only road links, and a second runway that could help link the city to international finance centers — were frozen after the crash and are still in the planning stages at the crucial moment when firms are weighing up whether to relocate.

Snarled traffic and public transport that compares poorly to continental capitals limit the areas that are reachable with a pleasant commute.

Pablo Che León Sarmiento, a Peruvian telecommunications professional who arrived in Dublin via Argentina and recently relocated to Shanghai, recalled his commute between two nearby districts of south Dublin.

"Sometimes it would be quicker to walk than to wait for a bus. It would be lines of cars from Ranelagh to Clonskeagh," Sarmiento said by phone from China. "Have you ever seen Shanghai? The city does not end. But block after block, the traffic just flows."

As it is, demand is boxed into limited areas. Already petite, Dublin’s eastern side is curtailed by the Irish Sea, while a building height cap of eight stories in most of the city limits its expansion skyward.

It means the prices are steepest and the shortages most severe in the very districts that appeal most to well-paid workers from overseas: the central and affluent areas of Dublin.

Guerrilla tactics

When homes are available, competition is fierce.

With Ireland’s economy heating up — it grew by 5.2 percent in 2016, the fastest rate in the EU — banks have become braver about approving mortgages. The number of mortgage approvals jumped 62 percent in the first quarter of 2017 compared to the same period a year earlier.

Without enough houses to go around, some buyers have turned to guerrilla tactics.

Thirty-nine-year-old IT project manager Stephen and his family got the house they wanted in a new development south of Dublin after his wife drove by and spotted people had begun queuing several days before homes there were rumored to be going on sale.

“There was only one shot,” said Stephen, who asked that his family name not be used in this story.

His wife, then on maternity leave, got in the queue that morning with their baby daughter in the back of the car.

There wasn't time to drop the baby off at nursery: Her grandmother came to collect her. Friends were alerted to be ready to take over the queuing in shifts.

Stephen arrived after work and stayed in the queue overnight. By the following day, there were 24 people queuing for 16 houses up for sale. A real estate agent arrived and handed out numbered tickets so that they didn't have to spend more nights sleeping outside.

“There were people in the queue working in multinationals, like Facebook and Google,” Stephen recalled. “We got to know our new neighbors. It ended up being fun.”

To those with fewer resources, the stakes are higher. With rents edging out of the reach of the less well-off, charities report that the number of families sleeping rough and in emergency accommodation has reached levels never seen before.

"For me, as an elected representative, this homeless crisis is an embarrassment," Varadkar's newly-appointed housing minister Eoghan Murphy told a press conference after missing a government-set July deadline to move roughly 650 homeless families out of emergency accommodation.

Schemes criticized

The government has tried two major legislative measures to address the issue, both of which seem to have backfired.

The first is a cap in rent rises of 4 percent in zones that are judged to be high-pressure areas. It has been criticized for incentivizing landlords to convert long-term lets into short-term ones and encouraging tenants not to move once their rent is protected, slowing availability.

The second was a help-to-buy scheme that offered first-time buyers of new homes a tax rebate of up to €20,000.

The IMF issued warnings about both measures, noting that the rent rise cap could reduce supply, and that help-to-buy could inflame demand further. Help-to-buy was quickly blamed for doing just that, and the government is now considering whether to scrap it.

The minority Fine Gael government's capacity to act is curtailed by its reliance on its traditional rival Fianna Fáil.

A 2016 housing plan, Rebuilding Ireland, set ambitious targets but is running behind schedule, and is now under review.

Some economists and homeless charities have urged the state to do more to address the primary problem of supply. Ideas include a rapid increase in the provision of social housing, streamlining planning procedures, and measures to encourage the use of Ireland's 200,000 vacant homes and potential 4,000 units that could be made from unused space above shops in Dublin.

The minority Fine Gael government's capacity to act is curtailed by its reliance on its traditional rival Fianna Fáil to get any legislation through parliament. A center-right party, it is inclined to trust the market and keep taxes low.

State spending must also remain tight in order to stick within EU deficit rules, while paying down one of the highest debt burdens in the bloc — another legacy of the crash.

Sign of success

Kieran Donoghue, the head of financial services for the foreign investment agency IDA Ireland, argues that high demand for housing is a sign that things are looking up.

“We’re talking about this as though it is a bad thing," he said. "These are nice, good, important challenges to have happen."

According to IDA, more than a dozen London-based firms have already agreed to set up or expand in Ireland due to Brexit. JPMorgan has bought a new office in Dublin with capacity for 1,000 employees, double its current payroll there. Insurer Legal & General is to move some of its investment management operations to Ireland, while law firm Pinsent Masons is to open a Dublin office.

Donoghue has welcomed a procession of corporate delegations to Dublin, mostly in finance, including e-money groups, payment firms, insurance groups, and banking and asset management companies.

Donoghue said he believes firms are going to develop both their front and back office capabilities in Dublin, but that the sector that would grow most is portfolio management.

“Will we win all of the investment available? No. Are groups going to abandon London entirely? Absolutely not,” he said. “A piece could come to Dublin, a piece to Frankfurt, a piece to Amsterdam. We’re looking at a much more distributed, decentralized structure in the financial services sector in the EU post Brexit, and that represents an opportunity for Dublin.”

The question is whether Ireland can move quickly enough to make the most of the opportunity.