SAN FRANCISCO — After a long legal battle plagued by procedural snags, Facebook has won a permanent injunction and $3 million in damages against spammer Power Ventures Inc. and its founder Steven Vachani.

U.S. District Judge Lucy Koh’s order, signed Wednesday, brings closure to a case the social networking company first filed in 2008, finding Power Ventures and its CEO liable for illegally accessing Facebook users’ data and sending more than 60,000 spam messages under the guise of being from Facebook itself.

Facebook associate general counsel Craig Clark said in a statement that the company was “pleased” with the outcome, though the compensatory damages awarded constituted about a sixth of the amount Facebook sought. “We will continue to enforce our rights against bad actors who seek to harm Facebook and the people who use it,” he wrote.

Last year, U.S. District Judge James Ware in the Northern District ruled that the Cayman Islands-based Power Ventures had violated federal law when it bypassed Facebook’s protections to access user data and mislead the spam recipients.

But the case’s conclusion was still far off: In June 2012, counsel for Power Ventures abandoned it, and shortly after locating a replacement that August, the company filed for bankruptcy. By the time the bankruptcy court dismissed Power Ventures’ claims, which prompted Facebook to reopen its case, Ware was no longer on the bench. The dispute landed on Koh’s docket in April 2013.

In her ruling this week, Koh echoed Ware’s previous findings and found Vachani personally at fault, concluding that, beyond simply being the company’s CEO, “facts demonstrate Vachani was the ‘guiding spirit’ behind Power Venture’s efforts to send the misleading spam emails to Facebook users.”

Facebook sought compensatory damages of up to $100 per violation under the federal anti-spamming law known as CAN-SPAM. Calling the matter “egregious,” it also sought to treble damages, for an award of $18 million total. Koh, however, granted $50 per violation and ruled trebling unnecessary, writing that “the requested maximum statutory award was disproportionate to the gravity of defendants’ acts.”

Menlo Park attorneys from Orrick Herrington & Sutcliffe, led by Neel Chatterjee, represented Facebook. Amy Anderson of Aroplex Law in San Francisco counseled Power Ventures and Vachani.

Contact the reporter at callison@alm.com.