GlaxoSmithKline has reached a $49 million settlement agreement with a class of direct purchasers who accused the drug maker of bringing “sham” patent litigation against manufacturers of generic versions of its popular antidepressant Wellbutrin SR in an attempt to prolong its monopoly on the market.

The plaintiffs filed a motion for final approval of the settlement on Friday, about four-and-a-half months after the parties reached an agreement during mediation.