Facebook has been slapped with a lawsuit by rival tech giant Yahoo for infringing 10 patents, a move which is seen as one of the first major patent battles among technology companies.
The suit came just months before Facebook's IPO, which is expected in May.
Among 10 alleged violations, only two are directly related to social networking technology.
Other violations are linked to online advertising methods such as preventing click fraud, privacy and webpage customisation technology. The suit was filed in the California federal court.
"Yahoo will continue to suffer irreparable harm - for which there is no adequate remedy at law -from such unlawful infringing activities unless this court enjoins Facebook from further infringing activities," Yahoo said in a statement. "Unfortunately, the matter with Facebook remains unresolved and we are compelled to seek redress in federal court."
According to the Yahoo lawsuit, Facebook was considered one of the worst performing sites for advertising prior to adapting Yahoo's ideas, Reuters reported.
"Mr Mark Zuckerberg, Facebook's founder and CEO, has conceded that the design of Facebook is not novel and is based on the ideas of others," the lawsuit reads.
Yahoo has more than 3,300 patents and published patent applications while Facebook owns 160 patents, according to the US government data base.
"We're disappointed that Yahoo, a long-time business partner of Facebook and a company that has substantially benefited from its association with Facebook, has decided to resort to litigation," said Jonathan Thaw, a Facebook spokesman.
The timing of the law suit is critical for Facebook as a litigation of any sort is the last thing it might look for at the time of its IPO. Facebook's IPO could value the company about $100bn.
In a similar move, Yahoo sued Google in 2004 just nine days before the company went public and Google agreed to issue 2.7 million shares of its stock valued at $290m at the time to Yahoo.
It is not clear if Yahoo would settle the lawsuit by demanding Facebook shares ahead of its IPO or go for an all-cash deal.
In its updated IPO filing, Facebook has included the Yahoo lawsuit against the company as a risk factor.
Yahoo appointed the law firm Quinn Emanuel Urquhart & Sullivan to carry out the litigation, whose clients include tech giants such as Google and Zynga.