Now with Brexit looming, rock-bottom interest rates squeezing margins, and behemoth competitors cratering loan prices, 'The Hanley' as it is affectionately known in its central England hometown, is taking some radical steps.

In the past year, the lender has started offering more high risk loans, targeted borrowers in their 70s and 80s and launched an interest-only mortgage aimed at retirees that lasts up to 55 years -- the principal is repaid when the borrower dies or moves into a nursing home.

The Hanley is one of just 43 building societies left from the hundreds that sprung up in Britain in the late 18th century. Community-focused and customer-owned, they are lenders with a traditionally conservative approach and account for around 23 percent of mortgage lending in the UK.

Across Britain, smaller players in the £1.4 trillion mortgage market -- building societies among them -- are seeking out niche segments and taking on more risk as they try to compete in a price war with the biggest banks.

A post-financial crisis housing market boom along with record employment levels have so far kept default rates at decade lows.

The fierce competition on price may be good for consumers, but if Britain's exit from the European Union leads to a dramatic slump, analysts and consumer experts warn that debts and loan losses could overwhelm some borrowers and lenders.

"The increase in mortgages available for older borrowers has been a positive development, but some of these products have not been tested in a severe downturn," said Gareth Shaw, personal finance expert at consumer advice firm Which?.

Unlike the United States, where banks have pulled back from the mortgage market in the wake of the financial crisis, Britain's largest lenders have maintained a steady grip.

Regulations introduced in January have also had the unintended consequence of strengthening the hands of the big five banks-- Lloyds Banking Group, Santander, Royal Bank of Scotland, Barclays and HSBC.

Along with Nationwide Building Society, the No 2 mortgage provider which has made a push into lending to older customers, those six lenders have held 70 percent of the market since 2009, according to data from UK Finance.

Nationwide said lending to older people had great potential.

“Later life lending is a fast growing sector which, given UK demographic trends, we believe has the potential to grow into a material part of the market," said Henry Jordan, Nationwide's Director of Mortgages.

Forced to separate their retail divisions from their riskier investment banking operations, large banks have been left with little choice but to push deeper into mortgages to earn a return on the pools of customer deposits ringfenced by the split.

The increased competition has cut prices on mortgages, particularly riskier products with a high loan to value ratio (LTV) -- the higher the loan to value ratio, the greater the risk of default if house prices fall.

"In competition terms it's predatory pricing. The use of a scale advantage to disadvantage competitors," said Ian Smith, chief financial officer of mid-sized lender Clydesdale Bank (CYBG.

A HSBC spokesman said the bank's strategy to expand in British home loans had been set in 2015, adding its strategy "remains positive for consumers". Santander said it was focussed on "sustainable growth" and had a conservative approach to risk.

Barclays, Lloyds and RBS declined to comment.

Britain's central bank has acknowledged that the regulations separating the big banks' retail and investment banking operations were partly to blame for the price war, but said the effects were 'manageable' for now.

The price of the average two-year fixed rate 95% LTV mortgage has fallen to 3.25% from over 5% in the last five years, while the number of such products has doubled to 146.

With a LTV of 95 percent, the borrower is in the red if house prices fall more than 5 percent and they haven't paid off any of the principal.

Sam Woods, deputy governor at the Bank of England, told an industry meeting in May that the central bank was watching the build-up of risk in the mortgage market "like a hawk", particularly the activities of building societies.

The Bank of England sent a letter to the chief executives of 20 unnamed fast-growing lenders on June 12, warning that some are underestimating potential losses from higher-risk loans. Some of these firms, launched after the 2008 financial crisis, have yet to experience an economic downturn.

A RACE TO THE BOTTOM

Founded in 1854, Hanley Economic has survived shocks to the coal mines, steel works and ceramics factories of Stoke, known locally as the Potteries because the UK pottery industry is based there.

The twin forces of competition and Brexit, however, have impacted the lender. Despite voting by nearly 70 percent in favour of leaving the EU, earning Stoke the nickname Britain's 'Brexit capital', uncertainty over when and how the UK will depart has prompted some locals to delay buying a house.

Rather than engage in a price war with bigger rivals to win more business, Hanley Economic decided to specialise. Its older customer base -- the average age of its borrowers is 51 -- seemed a natural focus.

"We have adapted our strategy by looking into more niche areas of lending, we don't want to wind up competing in a race to the bottom on pricing," David Lownds, head of marketing and business development, said in an interview at the lender's headquarters in a business park on the edge of Stoke.

Rivals are making similar moves.

There were 1,074 mortgage products on offer in Britain in June for people whose age when the loan matured was 80-84 years, compared with none in February 2014, when the dataset started, according to price comparison website Moneyfacts.

Home loans with a maximum age at the end of the term of over 85 years have similarly spiked from 33 to 239 products available in the same period.

The retirement interest-only mortgage (RIO) offered by Hanley Economic is aimed at older borrowers struggling to get a standard mortgage or to repay existing interest-only loans.

Customers only have to prove they can afford the monthly interest payments rather than the tough checks on income demanded by more traditional home loans.

The RIO product offers a useful alternative to more commonly used equity-release mortgages, Shaw, the consumer finance expert, said. But both are expensive and there are concerns some mortgage advisers may not be fully explaining the alternatives.

"If older customers are looking to fund an extension to their house or go on a cruise, they might just be better off with a credit card or a loan," he said.

To mitigate the risks of its push into high-LTV loans, retirement mortgages and other products, Hanley Economic has taken out insurance on 80%-plus LTV loans and maintained high core capital levels of 17 percent, Lownds said.

"We've managed a decade of low margins, and we've not much direct exposure to Brexit," he said.

The risk is that house prices, which have risen 45% on average nationally over the past decade, and 30% in Stoke in that period, drop sharply if Britain leaves the EU on Oct 31 without a divorce deal.

Some lenders have crunched the numbers and decided to retreat, including Tesco Bank - which has put its 3.7 billion pound mortgage book up for sale - and SecureTrust Bank which stopped writing new mortgage business.

Both firms said they were withdrawing due to competitive pressures.

Credit rating agency Fitch warned more lenders would likely follow Tesco Bank's lead and quit the market, or increase their risk exposure.

The credit agency singled out Coventry Building Society as one lender that had upped its risk profile through higher LTV lending and an increased exposure to interest-only mortgages on rental properties, downgrading it as a result.

The building society said it was disappointed by Fitch's action.

"We’re financially very strong and secure, with the highest risk-based capital of the UK’s top 20 lenders and loan impairments that are not only amongst the lowest in the industry but continue to get lower," Coventry said in a statement.

CYBG told investors it would not join the mortgages arms race but prioritise growth in business and unsecured lending.

It raised the pricing of its home loans this year and is committing only to holding its market share at around 4%.

"Customers are getting a great deal," said Smith. "But someone has to question whether really cheap mortgages are the be all and end all of competition in banking."

(Editing by Carmel Crimmins)

By Lawrence White and Iain Withers