In Tim Armstrong’s biggest M&A splash since taking the helm, AOL (AOL) plunked down $405 million on Wednesday to acquire video ad platform Adap.tv and also revealed stronger-than-expected second-quarter results.

Shares of the Internet company rallied on the earnings beat and latest efforts to bolster its video offerings.

AOL said the cash-and-stock acquisition of Adap.tv will give the company control of the only complete global programmatic video technology stack for publishers and advertisers across all screens.

“The combination of AOL and Adap.tv will create the leading video platform in the industry,” Armstrong said in a statement. "The Adap.tv founders and team are on a mission to make advertising as easy as e-commerce and the two companies together will aggressively pursue that vision.”

Armstrong said Adap.tv is positioned to capitalize on the movement from linear television to online video as well as the shift from manual transactions to programmatic media buying.

“We believe that most TV advertising will soon be traded programmatically on platforms like ours. The combination of AOL and Adap.tv accelerates our vision of efficient and effective TV and video advertising,” said Adap.tv CEO Amir Ashkenazi.

AOL said the purchase price includes about $322 million in cash and $83 million in common stock. The deal, the most expensive since Armstrong took over in 2009, is expected to close in the third quarter.

Meanwhile, AOL revealed a 97% plunge in second-quarter profits, saying it earned $28.5 million, or 35 cents a share, compared with $970.8 million, or $10.17 a share, a year earlier. Analysts had been calling for EPS of 32 cents.

The year-earlier period was boosted by a big one-time gain of $9.93 a share tied to a sale of patents to Microsoft (MSFT) for more than $1 billion.

Revenue rose 1.9% to $541.3 million, narrowly topping the Street’s view of $540 million.

"AOL continued to get leaner during Q2 while growing consumer traffic, growing all advertising revenue lines, and improving our subscription trends,” Armstrong said.

AOL’s results were highlighted by a 7% jump in ad sales to $361.2 million and an 8% increase in global search revenue to $93.7 million.

Global display sales gained 5% to $146.2 million, while AOL Properties reported a 6% bump in revenue to $239.9 million. AOL said subscription revenue fell 5% to $166 million.

Shares of New York-based AOL jumped 3.65% to $37.50 on Wednesday. AOL has rallied 22% year-to-date, but less than 11% over the past 12 months.

Follow Matt Egan on Twitter @MattMEgan5