Yahoo! filed first, accusing Facebook of abusing 10 patents.
Facebook counter-sued and was rumored to be preparing to go the distance in a court battle, The New York Times reported.
Many said former Yahoo! Chief Executive Officer Scott Thompson was simply trolling for cash with Yahoo!'s lawsuit, which was strategically filed two months before Facebook was to go public as a company.
Thompson, however, left Yahoo! when shareholders pressed the company about an error in his credentials -- a college degree that he did not have -- that appeared, among other places, on his company biography.
His replacement, interim CEO Ross Levinsohn, began to negotiate a settlement soon after taking charge of Yahoo!, the Times reported.
The case is an example of what has become one of the new frontiers of technology: Patent lawsuits.
The courtroom is so cutting edge for the industry that Yahoo! purchased a company, Overture, that was suing Google over patent violations and won, not just the company's business, but 2.7 million Google shares, when Overture and Google settled their case.
Facebook and Yahoo! said in a joint statement that they had agreed to "work together to bring consumers and advertisers premium media experiences promoted and distributed across both Yahoo! and Facebook."
The two adversaries "will also work together to bring Yahoo!'s large media event coverage to Facebook users by collaborating on social integrations on the Yahoo! site," the statement said.
Notable deaths of 2014 [PHOTOS]
Dude! Company floats fly hoverboard