German newspaper group Axel Springer has agreed a complex takeover of the country's biggest TV broadcaster, worth 2.47bn euros ($3bn; £1.71bn).
ProSiebenSat.1 is changing hands for the second time in three years
Buying ProSiebenSat.1 Media will lift Axel Springer into second place in Germany's media market, behind TV and publishing giant Bertelsmann.
The deal will also give Axel Springer more clout with advertisers.
"ProSiebenSat.1 is an investment that will pay off," said Axel Springer chief executive Mathias Doepfner.
"We are investing in a business that is profitable even in difficult times. We are creating a structure to open up the digital business of the future," he said.
Axel Springer owns the tabloid Bild newspaper, while ProSiebenSat.1 has four TV channels and a show-list that includes the popular US-made Desperate Housewives.
The group plans to execute the deal in several stages. It already owns 12% of the voting shares in ProSiebenSat.1, which are not publicly traded.
The remaining 88% are owned by a consortium called P7S1 Holding which is led by US media tycoon Haim Saban, the man behind the Power Rangers TV series.
The P7S1 consortium is selling up in exchange for cash and a 2.4% shareholding in Axel Springer, which will pay 23.37 euros per vote-carrying common share and 14.10 euros per listed preferred share.
It will then make a cash offer to holders of the remaining preferred shares, which are listed on the Frankfurt stock exchange but carry no voting rights in the company.
Axel Springer said it currently expects to pay 14.10 euros per share.
The deal represents a hefty profit for Haim Saban and the financial firms in his P7S1 consortium, which bought control of ProSiebenSat.1 in 2002 after its previous owner KirchMedia collapsed.