Britvic, which makes and sells brands such as Pepsi and 7UP in Britain, was hit this summer by poor weather and a recall of its children’s drink Fruit Shoot over faulty caps.
Quinns, the Irish drinks wholesaler it acquired in 2011, has also performed below market expectations.
Britvic has factories in Huddersfield and Leeds. It acquired the Ben Shaws brand in 2004.
The all-share deal, which creates one of the biggest soft drinks companies in Europe, will afford Britvic some stability after a difficult few years, said Canaccord Genuity analyst Wayne Brown.
“Both players have a huge amount to gain, but in the short to medium term, I think the Britvic shareholders should be breathing a sigh of relief that a white knight has come around the corner,” he said.
AG Barr shareholders will own 37 per cent of the enlarged group, while investors in Britvic will own the rest – a split in line with the relative market values of the two companies.
AG Barr CEO Roger White will lead the group, which is expected to achieve annual sales of £1.5bn.
The merger will come at the expense of up to 500 jobs.