Britain's Imperial Tobacco has agreed to buy Franco-Spanish rival Altadis for 16.2bn euros ($22.4bn; £11bn).
Altadis rebuffed Imperial's £8bn takeover attempt in April
Imperial said on Wednesday it would pay 50 euros a share for Altadis - an increase from an earlier offer of 47 euros a share which had been rejected.
Altadis had also received a proposal from private equity firm CVC Capital Partners, also worth 50 euros a share.
But Altadis has now said it will back the Imperial deal, in the absence of a higher offer.
Lambert & Butler
The move will join together the world's fourth largest cigarette group, Imperial, and the fifth, Altadis.
The combined firm will close the gap with the world's top three groups: Altria, British American Tobacco and Japan Tobacco.
Imperial said the deal, which would create cost savings of £200m a year, would be partly funded by a new rights issue of up to £5.4bn.
"Imperial Tobacco and Altadis are a great strategic fit, which will consolidate our position as the world's fourth largest international tobacco company," said Imperial chief executive Gareth Davis in a statement.
Speculation about an Imperial-Altadis deal emerged in December 2004, and on 14 March, 2007, Imperial made a cash indicative bid for Altadis at 45 euros a share, which was rejected.
In April, Imperial's improved bid of 47 euros a share - valuing Altadis at about 12bn euros ($16bn; £8.2bn) in all - was also rejected as too low.
Private equity groups CVC Capital Partners and PAI Partners made a 50 euro bid on 4 May. By the end of the month PAI had withdrawn and CVC said was to go ahead alone with the bid.