Facebook and Yahoo have settled their patent suit, the companies said Friday, after months of litigation.

Under the terms of the settlement deal, the two companies will expand their distribution agreements and cross-license some patents. They will also work together on large media events, integrating social networking into coverage on Yahoo’s site.

The deal settles all pending patent claims between the companies.

No money changed hands between the two companies, said a source familiar with the deal.

Yahoo and Facebook have been involved in a patent dispute for months, since Yahoo sued the social network, alleging that it had infringed on a variety of social networking and online advertising patents in March.

The suit was widely seen as a move by then-Yahoo chief executive Scott Thompson, who resigned in May amid questions about his claimed academic credentials. Yahoo’s new interim CEO, Ross Levinsohn, was said to be working to resolve the patent dispute, and personally thanked Facebook Chief Operating Office Sheryl Sandberg for her cooperation in the company’s release.

“We are looking forward to building on the success we have already seen to provide innovative new products and experiences for both consumers and sponsors,” said Levinsohn said in the release.  “Combining the premium content and reach of Yahoo! as the world’s leading digital media company with Facebook provides branded advertisers with unmatched opportunity.”

Sandberg noted Yahoo’s change in executive leadership in her statement on the deal. “Yahoo!’s new leaders are driven by a renewed focus on innovation and providing great products to users,” Sandberg said. “Together, we can provide users with engaging social experiences while creating value for marketers.”

Related stories:

Yahoo, Facebook reportedly close to settlement

Yahoo adds to Facebook suit

Facebook files Yahoo countersuit