The deal marks a step forward in TIM's three-year plan, unveiled in March, to make more of its processes digital, boost broadband coverage and offer more video, music and gaming content to win customers.

The TIM-Mediaset agreement also potentially further isolates Vivendi, a shareholder in both companies, which had aimed to do its own deals with either TIM or Mediaset as part of plans to create a southern European media powerhouse.

"The new accord marks a further step forward in the content strategy set out in the DigiTIM Plan, focused on delivering the maximum value to TIM customers combining the top television experience with the best connectivity," TIM said in a statement.

It provided no financial details of the deal.

The content agreement comes at a time when broadcasters like Mediaset are seeking to fend off competition from online content providers such as Netflix.

In March, for example, Mediaset signed a content sharing deal with Sky Italian business.

Mediaset said last year it would shift towards an on-demand business model, moving away from more expensive sports content.

Mediaset's pay-TV business, Premium, has failed to make a return on large investments made to broadcast Champions League and Italy's Serie A soccer matches and lost market share to Sky, its main competitor.

The Milan-based TV group, controlled by former prime minister Silvio Berlusconi, started rethinking its strategy for Premium after a 2016 deal to sell it to Vivendi fell through, leaving the two embroiled in a drawn out legal battle.

Vivendi, TIM's biggest shareholder with a 24 percent stake, has sought to create a joint venture between the Italian phone group and its own pay-TV arm Canal+, but the project was put on hold after opposition from some board directors.

With the JV off the table for now, and TIM striking its own deal with Mediaset, a settlement between Vivendi and Mediaset looks less likely.

Vivendi's grip on TIM also weakened last week after it lost control of the company's board following a campaign led by activist fund Elliott.

(Reporting by Agnieszka Flak and Giulia Segreti. Editing by Jane Merriman)