A federal judge in Delaware gave final approval Tuesday to a $9 million class-action settlement in Hartig Drug Co.’s antitrust suit against Allergan, after an appeals court in 2016 revived claims that Allergan had tried to suppress generic versions of its eye-care products.

The ruling, from U.S. District Senior Judge Joseph F. Bataillon of the District of Delaware, brought an end to nearly four and a half years of litigation in the product-hopping case, which had been closely watched by the pharmaceutical industry.