Time Warner chief executive Jeff Bewkes denied Wednesday that AT&T will raise the price of TV channels such as CNN and TBS as a result of the two companies’ $85 billion merger, calling the Justice Department’s landmark case to block the deal “ridiculous.”

“I think it’s ridiculous,” he said. “It’s not how this works.”

Testifying in federal court, Bewkes alleged that the tech industry — propelled by Amazon.com, Facebook, Google and Netflix — has dealt a “double-whammy” to his business, and that Silicon Valley poses a greater threat to Time Warner’s survival than AT&T and Time Warner pose to other TV providers, such as Comcast or Cox Communications.

(Amazon.com chief executive Jeffrey P. Bezos owns The Washington Post.)

The source of the tech industry’s power, said Bewkes, can be traced to online alternatives to the cable bundle that wield user data and convenience as potent weapons in the war for consumer attention.

Services such as Netflix have peeled consumers away from cable TV, reducing the revenue Time Warner receives from cable subscribers, said Bewkes. Yet at the same time, companies such as Google have put pressure on Time Warner’s other major source of revenue — advertising — as those tech platforms have turned their troves of customer information into multibillion-dollar data businesses that marketers find more effective than traditional TV ads.

“They know who the customer is. They know what the customer is watching,” Bewkes said of distributors such as YouTube TV. “It’s quite a bit more flexible than the wholesale business.”

That behavioral data is becoming increasingly important as marketers seek to target their ads to specific audiences, demographics and interest groups. Time Warner has tried to acquire that data through other means, said Bewkes, but it has historically lacked access to that information because it is a supplier to other businesses.

Time Warner considered purchasing a company with technology that can analyze the pixels being displayed on a consumer’s TV screen — to glean insights into which Time Warner shows Americans were watching. It also weighed whether to pay Comcast tens of millions of dollars for behavioral data on its customers.

But ultimately, Bewkes concluded through conversations in 2016 with AT&T chief executive Randall Stephenson that a merger was the quickest, most cost-effective path to gaining better information about consumer behavior.

“It became clear to both of us that although our companies didn’t overlap, we had complementary assets,” Bewkes told the court.

Pointing to charts showing a surge in digital advertising, Bewkes described the deal as a necessary move in a race against time. The market for online advertising surpassed television advertising last year, and it is expected to outpace TV advertising by $40 billion this year, according to industry estimates. Being owned by AT&T would give Time Warner access to the behavioral information of AT&T’s tens of millions of TV subscribers.

Recent contract negotiations with YouTube also show how companies such as Google potentially threaten Time Warner, said Bewkes. In discussions to add Time Warner’s content to YouTube’s lineup, Google negotiators sought to limit the number of Time Warner channels that would be shown on the platform, to limit the price of the bundle to consumers. But the streaming company insisted on rights to HBO, Time Warner’s premium cable channel.

Time Warner feared that allowing YouTube TV to carry HBO but not its other channels would prove disastrous. YouTube TV could use HBO to lure a customer away from traditional cable TV; if that happened and Time Warner’s other content was not represented on YouTube TV, Bewkes would lose the revenue for those channels that the same customer would otherwise be paying for through his or her cable company. (YouTube TV’s eventual deal with Time Warner did include popular Turner Broadcasting channels such as CNN, TBS and TNT.)

While cross-examining Bewkes, the Justice Department sought testimony that could show that gaining access to AT&T's data may not prove as lucrative for Time Warner as it claims. Government attorney Claude Scott tried to get Bewkes to concede that Comcast's purchase of NBCUniversal in 2011, a similar deal, did not meaningfully improve the combined company's ad revenue. And Justice questioned whether AT&T has enough viewing data on customers to make a significant difference in the fortunes of Time Warner.

But the government's approach, which frequently flitted from topic to topic, prompted confusion from Bewkes and Judge Richard Leon.

“I don't understand the question,” Bewkes said at one point.

“I don't get it either,” Leon told Scott. “Why don't you restate it?”

Under cross-examination, both Bewkes and AT&T's next witness, company executive John Stankey, were asked probing questions about their compensation should the merger be approved. Bewkes said that he expects to leave Time Warner once the transaction is complete, and that what he will be paid then will be roughly half what he would earn if he were to serve out the rest of his 2½-year contract with the company. He could take home a windfall worth as much as $200 million should the deal be approved. Stankey said his annual compensation was currently in the range of $10 million, and would increase by an amount that went undisclosed in court.

Stankey ticked off a number of cost savings and new business opportunities that the deal could create for AT&T. For example, he said, AT&T has ambitions to launch other online products besides DirecTV Now, its streaming television service. He said he could also envision Time Warner branded merchandise and advertising appearing in AT&T's retail outlets as a way to generate buzz and greater ticket sales for Time Warner films. CNN could create new advertising opportunities by producing 15-minute news roundups that are geographically targeted to consumers on mobile devices. And, he said, the merger could speed the adoption of ultra high-definition, or 4K, video if AT&T could control how TV content is produced or shot and distributed over its telecommunications network. The result, he claimed, would be $2.5 billion a year in benefits for AT&T.

“The market we're competing in is the market for the consumer's time and attention,” Stankey said.

Correction: An earlier version of this story reported that Stankey would receive $200 million if the deal went through. That figure refers to Bewkes, not Stankey.