Japanese advertising giant Dentsu has agreed to buy Britain’s media firm Aegis group for $4.9 billion in cash, thus becoming the market leader in the Asian-Pacific region.

The company said the Aegis acquisition is the largest in Dentsu's history and the second-largest made by a Japanese firm this year. It comes in the midst of the greatest boom in overseas investment the country has ever seen, helped by huge piles of cash held by companies.

"Dentsu and Aegis will be the market leader in the Asian-Pacific region, enjoying a strong presence across Europe and the fastest-growing agency network in the US," said Dentsu President and Chief Executive Tadashi Ishii. "We have huge ambitions for a truly client-focused global communication network built in the digital age," he added.

Dentsu said it would pay 240 pence for each Aegis share, a premium of 48% on Wednesday's closing price of 162.2 pence. The company added it has already obtained around 30% of Aegis's stock, mainly through French businessman Vincent Bollore, the group's largest shareholder. Ballore will receive $827 million for a 15% stake.

Dentsu is Japan's largest marketing firm and counts some of the biggest companies among its customers; however it has a limited footprint outside of Asia.

With more than $34 billion in foreign investments so far this year, Japan could equal last year's record $84 billion, which had brought the country to No. 3 in global deal rankings, from No. 9 in 2010, according to data provider Dealogic.