The Meredith Corporation (NYSE:MDP) has purchased Time Inc. (NYSE:TIME) for nearly $3 billion in an all-cash transaction. Under the terms of the deal, Meredith will pay $18.50 a share for the publisher. The boards of both companies have already finalized the deal. The deal is expected to close in the first quarter of 2018.

In the company’s statement announcing the agreement, Meredith’s president and chief operating officer Tom Harty said, “This is a transformative transaction for Meredith Corporation.” The larger scale will give Meredith even more appeal to advertisers on both the print and digital sides. Meredith predicted $400 million to $500 million in cost savings in the first two years of the acquisition.

The two companies have long courted different audiences. Time Inc. has been one of the country’s most celebrated magazine publishers. The company, founded by Henry R. Luce and Briton Hadden, is well known for its chronicling of world events and striking photography. Time Inc. is the publisher of a wide variety of magazine titles, including Time, Sports Illustrated and People.

The Meredith Corporation, founded in 1902 by Edwin Thomas Meredith, began with a magazine called Successful Farming. Its popular magazines are generally focused on families and women. Meredith is the owner of Family Circle, Better Homes and Gardens and AllRecipes. Better Homes and Gardens has a circulation of more than 7 million. The company also owns local television stations.

This is not the first time Meredith has made a play for the company. A previous deal between Meredith and Time Inc. fell apart in 2013. The sticking point in the negotiations appeared to be Meredith’s reluctance to acquire some of Time’s best-known titles. Earlier this year, Meredith again expressed interest in buying Time Inc., but reportedly had issues securing sufficient financing.

An infusion of $650 million from the private equity arm of billionaire brothers Charles G. and David H. Koch helped make the deal possible. Steve Lombardo, a spokesman for Koch Industries, said, “This is a passive financial investment made through our equity development arm.” In its announcement, Meredith said that the private equity fund would not have a seat on Meredith’s board of directors and would “have no influence on Meredith’s editorial or managerial operations.”