Mediaset will now sign an agreement with Sky, which holds the rights to broadcast the majority of matches on its pay-TV platform.
The court also ordered the public broadcaster to pay €25,000 in costs.
Rai believed it had an option that would have granted it the right to sublicense rights for the European football competition from Sky for the period between 2018 and 2021. However, Sky did not recognise the right and instead went to Mediaset, with who the paycaster is beginning to form a closer relationship.
The court established Sky was not under an obligation to share the rights with RAI.
Mediaset is reputed to have offered €50 per season for the FTA package. It includes the first pick of an Italian club on Wednesday nights and a match featuring teams from outside of Italy on Tuesdays.