CHC, which represents Welsh housing associations, said it had been working to get long-term loans worth more than £200m, as associations plan to build 13,000 affordable homes by 2021.

It would have meant associations could borrow at a low rate for as long as 30 years in order to build homes, take on apprentices and run training schemes.

Stuart Ropke, CHC chief executive, said the deal was almost across the line but has now faltered and the uncertainty surrounding Brexit was the reason.

He added: "There is no shortage of financial institutions who want to invest in what is a very successful sector but, what the EIB money would have done, those terms that were on offer - particularly the cost of funding - was very attractive.

"Those alternatives that are there will not be on such attractive terms - really, the impact of that is that millions of pounds will leave the sector."

Image caption
Prof Kent Matthews said social housing could secure loans from other sources

Loans from the EIB are typically half the commercial rate, resulting in housing associations having more money to invest.

The EIB has injected more than £1bn into Wales in the past decade in sectors including social housing, energy, water and transport.

In February, the housing association covering Torfaen - Bron Afon - was the first in Wales to get direct funding from the EIB, along with Principality Building Society and Royal Bank of Scotland.

The £30.5m loan enabled it to build 450 homes and CHC said Bron Afon got that agreement sealed before EIB investment slowed down.

'Valuable role'

An EIB spokesman said the organisation was talking to the Welsh Government about ways of funding Welsh social housing in future.

But professor of banking and finance at Cardiff Business School, Kent Matthews, said: "In a way, it's not usual for the UK to get these kind of grants. There are pockets of them and they do play a valuable role.

"But here in Wales, for instance, we're talking about a Welsh development bank. Now the Welsh development bank will be looking at SMEs [small and medium-sized enterprises] the sort of thing the EIB does.

"But there are other ways we in Wales can have those kinds of funds available for social housing."