There may be trouble brewing for Facebook and Oculus.  (AP Photo/Jeff Chiu)

Oculus had to weather some fan backlash and skepticism when the virtual-reality hardware firm announced in March that it was being sold to Facebook for $2 billion. But now, it's facing a much bigger problem: a possible legal challenge from one of the country's largest video game companies.

ZeniMax, which is based in Rockville, Md., said in a statement to The Washington Post that it had "recently sent formal notice of its legal rights to Oculus concerning its ownership of key technology used by Oculus to develop and market the Oculus Rift." ZeniMax also said that it's prepared to take "necessary action to protect its interests."

The average person probably knows ZeniMax best as the parent of subsidiary Bethesda Game Studios, the team responsible for mega-hits such as The Elder Scrolls games and Dishonored. But several other studios fall under its umbrella --  including id Software, a studio co-founded by Oculus chief technology officer and legendary game programmer John Carmack.

According to the ZeniMax statement, Carmack worked extensively on virtual reality research and development projects when he was still employed by the Maryland company, including some projects with Oculus VR in 2012 and 2013.  When Carmack left ZeniMax, the statement said, Oculus co-founder Palmer Luckey acknowledged in writing -- ahead of the Facebook deal -- that ZeniMax owned the intellectual property for the work Carmack did there during that time period.

"The proprietary technology and know-how Mr. Carmack developed when he was a ZeniMax employee, and used by Oculus, are owned by ZeniMax," the statement said. ZeniMax also said that Luckey agreed not to disclose the technology to third parties without the Maryland company's approval.

The statement also said that the two gaming firms had tried to strike a deal that would compensate ZeniMax for its technology by giving the firm equity ownership in Oculus but that they were "unable to reach a satisfactory resolution."

For its part, Oculus isn't going down without a fight. In a statement sent to The Post, the firm said that ZeniMax is in the wrong. "It's unfortunate, but when there's this type of transaction, people come out of the woodwork with ridiculous and absurd claims. We intend to vigorously defend Oculus and its investors to the fullest extent," the statement said.

Facebook declined to comment on the matter.