A Pontypool family gluten-free bakery firm has been sold to a Cardiff company in a deal potentially worth £25m.
The Lewis family - who are Ultrapharm's shareholders - will receive £17m, and potentially a further £8m, depending on its financial performance until 2021.
The sale comes as the rapid rise in the "free from" food market continues - it is estimated 1.3m people in the UK now follow a gluten-free diet.
Buyer Finsbury Food Group said it was diversifying into a high-growth market.
Ultrapharm was founded in 1993 in Pontypool and employs more than 240 staff across sites in the UK and Poland.
AIM-listed Finsbury Food Group manufactures cake and breads, supplying shops, cafes and restaurants, and has been one of Ultrapharm's clients.
Ultrapharm chief executive Marc Lewis is staying on with Finsbury Food as part of the deal.
The charity Coeliac UK estimates that 1.3m people in the UK have a gluten-free diet, including many who have other medical conditions such as irritable bowel syndrome (IBS) and non-coeliac gluten sensitivity.
Food and drink analyst Alice Baker from market research company Mintel said the rise of gluten-free products is part of the growing popularity of "free from" products.
"A number of factors including media buzz, celebrity endorsement of exclusion diets, increased distribution and visibility [in shops] and sustained product development... have all contributed to robust underlying growth," she said.
Other Welsh manufacturers of "free from" products include Welsh Hills bakery in Aberdare, Rhondda Cynon Taf and Brighter Foods in Tywyn, Gwynedd.
John Duffy, chief executive of Finsbury Food Group, said the sale gave "a further foothold in Europe and allowing us to diversify into the 'free from' market".
Ultrapharm's sales were £19.5m in 2017, up from £14.5m in the previous year. Its profit before tax last year was £800,000.