Kevork Djansezian/Getty Images

LONDON – Liberty Global, the international cable company owned by the American billionaire John C. Malone, agreed on Tuesday to buy the British cable company Virgin Media for about $16 billion.

The deal gives Liberty Global access to Europe’s largest cable market, and pits Mr. Malone against Rupert Murdoch, his longtime rival and biggest shareholder in Britain’s largest pay-TV provider British Sky Broadcasting.

Under the terms of the deal, Liberty Global said it had offered a package of cash and stock that it valued at $47.87 for each share in Virgin Media, a 24 percent premium over Virgin Media’s closing price on Monday.

The takeover ranks as one of the 10 largest cable deals of all time, according to figures from the data provider Thomson Reuters.

“Virgin Media will add significant scale and a first-class management team in Europe’s largest and most dynamic media and communications market,” Mike Fries, Liberty Global’s president and chief executive, said in a statement.

“After the deal, roughly 80 percent of Liberty Global’s revenue will come from just five attractive and strong countries — the U.K., Germany, Belgium, Switzerland and the Netherlands.”

News of the talks, confirmed earlier in the day in a statement by Virgin Media, came amid heightened merger and acquisition activity in the European television business. As European broadcasters suffer from stagnant or falling advertising revenue, American media conglomerates, looking to expand their international presence, are playing a significant role.

Mr. Malone and Mr. Murdoch have gone head-to-head before. From 2004 to 2006, they fought for control of DirecTV, the American satellite television provider.

The clash ended with Mr. Malone yielding a stake that he had built up in News Corporation. But the Liberty Group, which has operations in 13 countries, completed its purchase of a controlling stake in DirecTV from News Corporation in a cash-and-equity deal worth roughly $11 billion.

In recent years, Liberty Global has been expanding its presence in Europe and has operations from Ireland to Romania, though it failed last month in its bid to acquire the Telenet Group of Belgium for $2.7 billion. Liberty Global owns a 58 percent stake in Telenet.

Since early 2010, Liberty has bought two German rivals to build its operations in Europe’s largest economy.

In response, News Corporation has been expanding its global cable business, including the $2.1 billion acquisition of Consolidated Media, the Australian pay-television company, late last year.

Since the beginning of the financial crisis, Virgin Media, whose commercials feature the Olympic sprinting star Usain Bolt, has announced job cuts and invested in its broadband structure to reduce costs and increase its market share in Britain’s competitive cable market.

The company’s market capitalization stands at more than $10 billion. Including debt, its enterprise value is around $19.4 billion, according Thomson Reuters. Shares of Virgin Media, which are primarily traded on the Nasdaq, were up nearly 18 percent to $45.61 on the news of the Liberty talks.

Virgin’s shares have jumped almost 90 percent in the last 12 months, as more consumers sign up for so-called bundled services, including Internet and cellphone contracts. Virgin Media will announce its earnings on Wednesday.

Analysts warned that it would be difficult for Liberty Global to make additional savings between its current European operations and those of Virgin Media because Liberty does not have a business in Britain.

They said Liberty waited to make its move until Virgin made several upgrades to its network and restructured its debt. While Virgin has been gaining market share, it has 4.9 million customers, or roughly half the number of subscribers as its larger rival, BSkyB, according to filings by the companies.

The British billionaire Richard Branson, whose Virgin brand is used for a variety of products and services, including airlines and banks, owns less than 3 percent of Virgin Media.

News of the talks also came amid heightened merger and acquisition activity in the European television business. In December, Discovery Communications agreed to pay $1.7 billion for the Scandinavian operations of a large German commercial television company.

According to news reports this week, the majority owners of the German company are considering a sale. American media companies, including Time Warner, have been mentioned as potential buyers.

Analysts say the flurry of activity is driven by a desire among pay-television companies and broadcasters to diversify revenue sources that are coming under increased pressure. So broadcasters are setting up pay-television channels, and cable and satellite companies are looking to new content delivery platforms, like the Internet.

While commercial broadcasters remain powerful in Germany, Britain is the most lucrative pay-television market in Europe, according to Screen Digest, a research firm.

The deal for Virgin Media is expected to close during the second quarter of this year.

LionTree Advisors, Credit Suisse and the law firms Shearman & Sterling and Ropes & Gray advised Liberty Global, while Goldman Sachs, JPMorgan Chase and the law firms Fried Frank and Milbank advised Virgin Media.

Mark Scott reported from London, and Eric Pfanner from Paris.