S&N is the UK's largest brewer, with brands such as Newcastle Brown Ale and Foster's, and is the world's seventh largest brewer by sales volume.
The company is set to be split up between Carlsberg and Heineken when the takeover is completed.
Edinburgh-based S&N employs 3,300 staff in the UK, with breweries in Reading, Manchester, Dunston and Tadcaster.
The firm also employs more than 15,000 employees in direct operations in Europe, a further 15,000 in its BBH joint venture in Eastern Europe and more than 7,000 people in Asia.
S&N received its first bid approach from Carlsberg and Heineken in October last year, when the two firms offered 720p-per-share. The approach was rejected, as were two further offers.
However, last week S&N said it had begun talks with the two firms when they proposed an 800p-per-share offer, an offer it has now agreed to.
"The S&N board believes that the consortium's offer delivers a fair value for S&N, reflecting its growth prospects, and will be recommending that shareholders accept," S&N said.
The break-up plan means Heineken will acquire S&N's British operations, including Strongbow cider and John Smith's beer.
Heineken said it would achieve savings of £120m annually, new distribution in the UK and access to the UK's fast-growing cider market, as well as access to developing markets.
Carlsberg said the benefits of the deal included full ownership of BBH - the Russian-based joint venture between it and S&N - plus exposure to growth markets and cost savings.
"For Carlsberg, it is a transformational transaction, which will deliver a major increase in its operational scale and long term growth prospects," said the firm's chief executive Jorgen Buhl Rasmussen.
"In a single step, we have created the world's fastest-growing global brewer."
"We now have full control of our destiny in Russia and other BBH territories and I am truly excited about the new opportunities this will present to us," he added.
Ownership of BBH, which owns Baltika beer, had led to a row after S&N said Carlsberg's role in the takeover approach had broken the joint-venture agreement.
S&N said guarantees from Heineken would be put in place regarding the company's UK pension scheme.
"As part of the agreement, Heineken will also accelerate the deficit payments previously agreed with S&N, with an injection shortly after closing £50m into the plan," the firm said.
But there were concerns that the deal could lead to job losses in the UK and reduce consumer choice.
Mike Benner, chief executive of the Campaign for Real Ale, said: "The inevitable result of consolidation is brewery closures, brand losses and less choice for Britain's consumers."
He also questioned the impact it would have on traditional real ales in the UK such as John Smith's and smaller regional brands such as Magnet.
Unite, the union, said it had contacted Heineken's chairman, Mr Van Boxmer, and would be pressing for a meeting with him to "secure a range of commitments relating to the job security of our members".
By early afternoon, S&N shares were 2.5% up while Heineken soared 27% but Carlsberg shares had fallen 1.8%.
The deal still requires approval by the European Commission as well as other competition bodies and is tipped to be completed by the second quarter.