Gawker has settled its long-running case with Hulk Hogan, ending the lawsuit that forced the company into bankruptcy after it lost an initial ruling earlier this year.

In exchange for dropping his invasion of privacy claims, Hogan will receive $31 million from Gawker. That’s down significantly from the $140 million Hogan was initially rewarded. The sex tape story that Hogan was suing over will also be removed from Gawker’s website.

The settlement came as something of a surprise this afternoon, as Gawker has long repeated that it expected to win this case on appeal. But in a blog post, Gawker founder Nick Denton said that continuing the legal proceedings wasn’t maintainable — especially with billionaire Peter Thiel at Hogan’s back.

“All-out legal war with Thiel would have cost too much, and hurt too many people, and there was no end in sight,” Denton wrote.

Just in: A statement from Hulk Hogan's lawyer pic.twitter.com/X1sQxRLeLf — Eriq Gardner (@eriqgardner) November 2, 2016

Gawker also announced settlements in two other lawsuits today, which include $1.25 million in payments. Stories related to those two parties will also be removed from the site. Denton calls this, “the most unpalatable part of the deal.”

Though Gawker itself has shut down as a result of this lawsuit, the company’s other sites live on under their new owner, Univision.