On Friday, generic drugmaker Barr Pharmaceuticals (NYSE:BRL) confirmed that it had filed for marketing approval of a generic version of Sanofi-Aventis' (NYSE:SNY) Ambien CR insomnia treatment and that Sanofi had disputed the marketing application.

Sanofi's Ambien franchise brought in $2.6 billion worth of sales last year and accounted for 7% of its total revenue in 2006. Ambien franchise sales were up a whopping 43% in the fourth quarter and 33% for the full year, but the immediate-release formulation of Ambien faces the expiration of its patents this month, which makes the controlled-release (CR) version of the drug even more important to Sanofi.

Now that Sanofi has decided to defend its patents against Barr's generic challenge, the FDA will stay any decision on approving Barr's generic Ambien CR for either 30 months (until March 2009) or until the patent litigation is resolved, whichever comes first.

Being the first to file for generic approval of a branded drug means that Barr will get six months of marketing exclusivity, and the high-margin sales that come with it, if it can break the Ambien patents in the courts. Sanofi claims to have a U.S. patent on the controlled-release version of the drug that is valid until 2019, but the validity of its patents has proven to be shaky in the past; its other top two products, Lovenox and Plavix, have been assaulted by patent challenges in the past year.

Patents are the main competitive advantage protecting the big pharma companies' monopolistic profits. Unlike biopharmaceutical drugs, easily replicated small-molecule drug compounds face extreme price competition once they lose patent protection. Facing generic competition on all of its Ambien franchise sooner than expected would be another disastrous blow to Sanofi, since Ambien is its fastest-growing franchise and third highest-grossing product.

Barr is a Motley Fool Stock Advisor recommendation. Discover more potentially explosive stock picks from David and Tom Gardner with a free 30-day trial subscription.

Fool contributor Brian Lawler eats a generic apple a day to keep the doctor away and does not own shares of any company mentioned in this article. The Fool has a disclosure policy.