MILAN — Netflix has agreed to pay more than $59 million to settle a tax dispute, Milan prosecutors said Friday.

The payment covers taxes, penalties and interest from October 2015 through 2019. The streaming service also established an Italian legal entity this year, which will determine its Italian tax burden based on subscriptions to Italian residents, prosecutors said.

Prosecutors in Milan said the investigation was triggered by the physical presence in Italy of technological infrastructure, including 350 servers, aimed at producing revenue.

In a statement, Netflix said it cooperated throughout the investigation and welcomed the settlement that ends the tax case.