Yahoo struck at its ally Facebook last month, now the social-media giant is striking back. The fray started in March, when Yahoo filed a lawsuit against Facebook in U.S. District Court for the North District of California, alleging that Facebook is infringing on 10 of its patents.

Specifically, Yahoo claimed Facebook was infringing on patents that cover its technologies for privacy, advertising, site customization, social networking and integrated communications in social networking.

Facebook just filed a countersuit against Yahoo. Facebook alleges the search engine company has infringed on its patents for advertising, photo tagging and online recommendations. Yahoo says the lawsuit is "without merit." The case could drag on for years.

Facebook Strengthens Its Hand

We asked Greg Sterling, principal analyst at Sterling Market Intelligence, about his take on the Facebook countersuit. As a former practicing attorney, he said he could not speak to the legitimacy of the underlying claims. However, he told us this kind of tactic is to be expected.

"Facebook wants to push back and put pressure on Yahoo and create a more favorable negotiating position. Without any counterclaims of its own Yahoo would be in a much stronger position in the litigation and any settlement negotiations. Now Facebook has some leverage," Sterling said.

"The outcome of the case may ultimately be determined by adjudication of the merits of the patent claims. But Facebook has strengthened its hand regardless of how tenuous its own counterclaims may be."

Yahoo Lays Off 2,000

Meanwhile, Yahoo on Wednesday shared the steps it is taking to reshape the company for the future. Yahoo has a solid foundation with nearly 700 million users and thousands of advertisers on its properties. Yahoo plans to restructure in order to respond more quickly to customer needs and compete more effectively in areas where it bets it can win. Part of that means laying off 2,000 people.

Yahoo said it had identified key parts of the business -- a select group of core businesses, the platforms that support those core businesses, and the data that drives deep personalization for users and ROI for advertisers -- where the company will intensify efforts and redeploy resources globally.

"Today's actions are an important next step toward a bold, new Yahoo -- smaller, nimbler, more profitable and better equipped to innovate as fast as our customers and our industry require," said Scott Thompson, CEO of Yahoo.

"We are intensifying our efforts on our core businesses and redeploying resources to our most urgent priorities. Our goal is to get back to our core purpose -- putting our users and advertisers first -- and we are moving aggressively to achieve that goal. Unfortunately, reaching that goal requires the tough decision to eliminate positions. We deeply value our people and all they've contributed to Yahoo."