Meredith Corp., the publisher of Better Homes and Gardens, Shape and many other magazines targeted largely at women, is buying Time Inc., the publisher of Time, Sports Illustrated and Fortune, in a $2.8 billion all-cash deal, both companies said Sunday.

Meredith, based in Des Moines, Iowa, said the deal was being backed by conservative billionaire brothers Charles and David Koch. The company held unsuccessful talks to buy Time earlier this year and in 2013.

The Koch brothers' private equity arm, Koch Equity Development, or KED, agreed to offer Meredith $650 million in preferred equity to fund the Time acquisition. KED is already a major stakeholder in Flint Group, based in Luxembourg, one of the world's largest suppliers of ink and printing industry supplies.

The Koch brothers, David, left, and Charles, are conservative political powerhouses, but Meredith said they won't have any role in editorial or management.AP; Getty Images

The brothers, who are two of the world's richest men, are known for their advocacy of conservative policies and influence on some quarters of the Republican Party. Both companies said the Koch unit won't have a seat on Meredith's board and will have no influence on Meredith's editorial or managerial operations.

When combined, the Meredith and Time brands will have a readership of 135 million people and paid circulation of nearly 60 million.

The deal will add news, business and sports brands to Meredith's roster of lifestyle publications. Analysts have said that bulking up on publishing assets could give the company the scale it needs to spin off its broadcasting arm into a standalone company.

The deal will also expand Meredith's reach with internet-savvy millennials, creating a digital media business with 170 million monthly unique visitors in the United States and more than 10 billion annual video views.

"When you combine our strong local television business — which has grown operating profit 15 percent annually over the last five years – with the trusted, premium multiplatform content creation of Meredith and Time Inc., it creates a powerful media company serving consumers and advertisers alike," Tom Harty, Meredith's president and chief operating officer, said in a statement.

Time said the deal was scheduled to close in the first quarter of 2018. Rich Battista, Time's president and chief executive, will work with Meredith "to ensure a smooth transition" through the closing date, when he is expected to leave the company, Time said.

Time is America's largest magazine publisher, but it has struggled amid a massive corporate restructuring and a decline in print revenue. In June, it laid off 300 employees in a bid to grow its digital properties.