Waterstones is buying the historic family-owned book chain Foyles in a surprise deal billed as an antidote to the “siren call” of online rival Amazon.

The sale brings down the curtain on the independence of one of Britain’s best known bookselling dynasties, with Foyles most famous for its Charing Cross Road branch in London.

James Daunt, the managing director of Waterstones, made a pointed reference to the competitive threat posed by Amazon, which is being blamed for killing off the high street book trade. He said: “Together we will be stronger and better positioned to protect and champion the pleasures of real bookshops in the face of Amazon’s siren call.”

With 283 shops Waterstones, which also owns Hatchards, is Britain’s biggest book chain with £404m in annual sales. Foyles operates seven branches, with four in London and the remainder in Birmingham, Chelmsford and Bristol.

The value of the deal has not been disclosed but Daunt said he had been approached by Foyles to acquire the company. Foyles is controlled by its Monaco-based chairman, Christopher Foyle, who is the grandson of one of the founders.

“My family and I are delighted that Foyles is entering a new chapter, one which secures the brand’s future and protects its personality,” Foyle said. “I look forward to witnessing the exciting times ahead for the company founded by my grandfather and his brother 115 years ago.”

In recent years Foyles has been run by hired hands and, with no heir apparent, in 2014 Christopher Foyle told the Guardian “one day I will make a decision; unless I die in the saddle”. He owns 65% of the company with the rest shared between other family members and management.

Foyles traces its roots back to the turn of the last century when William and Gilbert Foyle, aged 17 and 18, launched a bookselling business from their kitchen table after failing their civil service exams. The first iteration of the Charing Cross Road store opened nearly a decade later.

William’s daughter Christina joined the family firm in the 1920s and she helped put it at the heart of the literary world, hosting the Foyles literary luncheons, which were attended by famous authors and prime ministers. She handed over the reins to her nephew Christopher six days before she died in 1999.

During its long history Foyles has weathered financial highs and lows. It made a small loss in the year to 30 June 2017 after the number of shoppers visiting its stores declined in the wake of the terrorist attacks in London and Manchester.

The deal has been brokered at an opportune time as in the coming years the business, with annual sales of £26.6m, would have to keep up with hefty rental payments on the famous Charing Cross Road store which the family sold to property investors for £45m earlier this year.

In a statement the Foyle family added: “James Daunt has assured us of his desire to maintain and celebrate the Foyles name and our distinct bookselling identity. Whilst the decision to sell has been a hard one, we are confident that Waterstones will nurture and protect Foyles for the good of the business, its staff and its customers.”

The rise of Amazon has had a dramatic impact on the high street book trade, with the number of independent book shops halving to 858 since the US retailer’s UK launch two decades ago. This week the Booksellers Association warned MPs looking at the future of the high street that “bookshops have closed because of Amazon”.

Waterstones has been a key player in industry consolidation in recent years. As book sales transfer online, Waterstones has bought up struggling smaller rivals Dillons, Ottakar’s and Books Etc. It was recently sold to the hedge fund Elliott Advisors, the UK division of the $34bn (£25bn) activist hedge fund Elliott Management, run by controversial New Yorker Paul Singer.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

Daunt promised the deal would not spell the end of Foyles as we know it and pointed to its careful custodianship of other brands such as Hatchards and Hodges Figgis. “Waterstones has the ability to carry a very distinctive bookselling brand within the business,” he said. “Foyles has a huge stature and I respect and believe in that.”

Daunt said the Foyles deal created a stronger business to stand up to the might Amazon: “It is definitely getting worse for the [book] industry as a whole as Amazon is continuing to grow sales and market share. As a retailer it’s not making money and will happily subsidise its overall relationship with customers by cutting the price of books so people will join Prime and buy a blinking Alexa, shoelaces and all the rest.”