Social media giant Facebook has been ordered to pay $500m in damages in a lawsuit that accused its subsidiary Oculus VR of using stolen software code.

The lawsuit was filed by ZeniMax Media against the virtual reality headset maker Oculus, which was acquired by Facebook in 2014 for $2bn.

A jury in Dallas, Texas found that Oculus cofounder Palmer Luckey had violated a signed non-disclosure agreement with Zenimax.

The jury has ordered Oculus to pay $200m for violating the non-disclosure agreement, $50m for copyright infringement and $50m for improper use of ZeniMax’s trademarks.

However, Oculus was not found guilty in claims over theft of trade-secrets from ZeniMax.

Oculus spokeswoman Tera Randall was quoted by Bloomberg as saying in a statement: “The heart of this case was about whether Oculus stole ZeniMax’s trade secrets, and the jury found decisively in our favor.

“We’re obviously disappointed by a few other aspects of today’s verdict, but we are undeterred. Oculus products are built with Oculus technology.”

Jurors have also ordered Oculus’s co-founders, Brendan Iribe and Luckey, to pay $150m and $50m in damages, respectively, for misusing ZeniMax’s trademarks.

The Oculus buyout enabled Facebook to compete with Microsoft, Sony, Alphabet’s Google and others in the virtual reality market.

In March last year, the networking major started shipping virtual reality device Rift for Facebook loses $500m Oculus virtual reality lawsuit$599.

ZeniMax claimed that it was responsible for finding key requirements for the development of software and hardware for the headset.

But its intellectual property was claimed to be stolen by one of its employees after joining Oculus VR.

The case pertains to video-game programmer John Carmack from ZeniMax, who was responsible for designing popular games Doom and Quake.

In 2013, Oculus named Carmack as its chief technology officer.

ZeniMax was quoted by the publication as saying that “while it regrets having to go to litigate to vindicate its rights, it was necessary to take a stand against companies that engage in illegal activity in their desire to get control of new, valuable technology.”