Investors in Sanofi-Aventis (NYSE:SNY) can take a deep, cleansing breath. The company no longer has to worry about losing the lawsuits it brought against Teva Pharmaceuticals (NASDAQ:TEVA) and Barr Pharmaceuticals (NYSE:BRL) over its allergy medications, since both companies settled with the French drugmaker yesterday.

Barr and Teva, which are in the process of joining forces, will each pay about $30 million to Sanofi for violating its patents when they launched generic versions of Allegra in 2005. They'll also have to pay an undisclosed royalty on future sales in the U.S.

Albany Molecular Research (NASDAQ:AMR) will get $10 million of that up-front fee, and a fraction of Sanofi's royalties, for its part in helping to develop Allegra. Those royalty payments will earn frequent flyer miles as they go from the U.S., to Israel, to France, and then back to the U.S.

In two other separate settlements -- although presumably, the negotiations were linked -- Barr settled its patent lawsuit with Sanofi over the 12-hour version of Allegra and another allergy medication, Nasacort AQ. Barr hadn't launched those drugs yet, so it doesn't owe Sanofi any money. Instead, Barr negotiated a launch before the patents on the drugs expire, in exchange for paying Sanofi a royalty. It'll be able to launch generic versions of extended-release Allegra in November of next year, and Nasacort AQ (in conjunction with partner Perrigo (NASDAQ:PRGO)) in June 2011.

The settlement is likely the best deal for all parties. Sanofi is getting more than it would have if it lost the lawsuits, but presumably less than it would have if it won. Taking the cash -- and royalties -- and moving on seems like a good move for Sanofi.

We prescribe further Foolishness:

Motley Fool Rule Breakers is always on the hunt for hot drug stocks and other cutting-edge picks. See all of our latest discoveries with a free 30-day trial subscription.

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. The Fool has a disclosure policy.