ARLINGTON, Va. (AP) --€” Rosetta Stone (NYSE:RST) and Google (NASDAQ:GOOGL) have agreed to dismiss a three-year-old trademark infringement lawsuit between the two companies and made plans to work together to fight trademark abuse online.

Rosetta Stone sued Google in 2009 for allowing rivals to advertise copycat software when Rosetta's trademarks were used as search terms in Google's AdWords system. The company argued that Google's actions created consumer confusion by allowing counterfeit products to be sold using its trademarks.

A district court in Virginia dismissed the lawsuit in 2010. But the case appeared to be headed to court again this year after an appeals court determined that some of the claims should be heard at trial.

The foreign-language-education company, which is based in Arlington, Va., and the Mountain View, Calif.-based Internet search leader said Wednesday that both companies "would rather cooperate than litigate." They said they have made plans to work together to fight piracy and trademark abuse on the Internet.

The companies plan to "meaningfully collaborate" to fight online ads for counterfeit goods and prevent the misuse and abuse of trademarks on the Internet. They said they will work with law enforcement officials to go after counterfeiters at the source. They did not disclose any additional terms to the settlement.

Rosetta Stone's shares increased 26 cents, or 2.3 percent, to $11.71. Google's shares increased $5.15, less than 1 percent, to $680.30.

The Motley Fool owns shares of Google and Rosetta Stone. Motley Fool newsletter services recommend Google and Rosetta Stone. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.