As part of an agreement to avoid prosecution, Christie’s will pay up to $16.7 million for failing to properly collect New York sales tax from 2013 to 2017 on private purchases made in the state or ultimately delivered there, the Manhattan district attorney’s office said on Thursday.

The fine comes after a yearslong investigation into the tax-collection practices of the auction house’s London-based private sales arm, as well as those of other Christie's-affiliated companies overseas — including ones in Amsterdam, Dubai and Hong Kong — conducting business with clients in New York. The settlement requires $10 million to be paid up front and the remainder to be paid in about two years.

According to public documents describing the agreement, the tax violations arose from bureaucratic changes and flawed tax advice.

In 2013, Christie’s started operating a separate company called Christie’s Private Sales that would centralize private purchases. When planning for the new company’s launch, prosecutors said, a senior tax adviser told executives that the new company, based in London, would not have to register to collect state and local sales tax in New York.