In fighting a lawsuit filed by the former professional wrestler Hulk Hogan, Gawker Media lost nearly everything — the verdict, its founder, its independence — but it maintained its resolute conviction that it would win on appeal.

On Wednesday, however, Gawker capitulated, settling with Hulk Hogan, whose real name is Terry G. Bollea, for $31 million, according to court documents, and bringing to a close a multiyear dispute that stripped the company of much that once defined it.

Faced with a $140 million judgment in the invasion of privacy lawsuit brought by Hogan over the publication of a video that showed him having sex with a friend’s wife — and the later revelation that Peter Thiel, the billionaire Silicon Valley entrepreneur, was financing the lawsuit and others against the company — Gawker filed for bankruptcy in June and ultimately sold itself in August to Univision for $135 million.

The sale brought an end to the company’s independence, and Nick Denton, its founder and chief executive, left. Univision took down other Gawker articles that were involved in litigation. Gawker.com, which was at the center of the Hulk Hogan lawsuit, was shut down. Gawker Media even lost its name — the sites that Univision acquired are now part of the Gizmodo Media Group.