Rosetta Stone, the Arlington language software maker, has agreed to drop a three year-long lawsuit against Google that accused the search giant of illegally selling Rosetta Stone trademarks to third-party advertisers that linked to sites selling counterfeit software.

The two companies reached a settlement Wednesday. The terms of the settlement were not disclosed.

As part of the agreement, the companies will work together with law enforcement to combat online ads for counterfeit goods and prevent the abuse of trademarks on the Internet.

“At the end of the day, both companies would rather cooperate than litigate, and we believe this agreement is an important step toward eliminating piracy and trademark abuse on the Internet,” Rosetta Stone and Google said in a joint statement.

The case was closely watched by the business community — with 33 major corporations, trade associations and professional sports leagues lining up on Rosetta Stone’s side — because it was seen as a test case for whether Google could be held liable for the actions of third-party advertisers.

“This settlement is a significant victory for consumer protection, and it goes a long way toward advancing our goal to strengthen the Rosetta Stone brand and trademarks around the world,” said Rosetta Stone general counsel Michael Wu. “Being able to enlist Google in our ongoing fight against online piracy and counterfeiting is an important step in achieving our goal.”

Rosetta Stone sued Google in U.S. District Court for the Eastern District of Virginia in 2009, accusing the search site of selling trademarked phrases like “Rosetta Stone” and “language library” to third-party companies that make copycat software. The Google advertising program, AdWords, allows third parties to buy keywords that generate sponsored links when someone types the phrases in an online search. In some cases, those links took consumers to Web sites selling copycat software, misleading them to think those products were genuine Rosetta Stone software, the lawsuit alleged.

The suit was dismissed in 2010. But last April, the Fourth Circuit Court of Appeals reinstated the case, opening the door for other companies to sue Google over similar claims. The resolution of Rosetta Stone’s lawsuit does not preclude other companies from bringing similar claims against Google.