Defending against and filing lawsuits is a fact of life for every generic drugmaker. The most common course of action is to fight a drug's patent legality before launching a generic version. Risk-taking generic drug companies, though, sometimes launch their products "at risk" while fighting the legality of a pharmaceutical company's patents. Launching a generic drug at risk could mean paying substantial damages if the generic company loses the patent trial, but for drugs with large enough markets, this is sometimes a risk worth taking.

Generic drug producer Teva (NASDAQ:TEVA) and pharmaceutical giant Pfizer (NYSE:PFE) settled their differences last week, though, rather than burn through more dollars fighting each other in the courts over two of Pfizer's drugs. An agreement between the two companies settles patent litigation Pfizer had initiated over a cancer treatment and the antibiotic Zithromax, which Teva had been marketing a generic version of, despite Pfizer's claims that it still held the drug's valid patent.

As part of the agreement, Teva will pay Pfizer up to $70 million and will get an option to market another one of Pfizer's cancer drugs in 2007. That drug, named Ellence, has produced sales of $68 million in the first half of this year for Pfizer. The option to market Ellence isn't such a great coup for Teva, though, considering that Mayne Pharma (soon to be acquired by Hospira (NYSE:HSP)) already sells a generic version of the drug.

Teva got more good news on the generic front last week when it received approval to market a generic version of GlaxoSmithKline's (NYSE:GSK) Zofran. Zofran is used to treat some of the side effects of chemotherapy, and had sales of nearly $700 million in the last 12 months.

If generic drug companies aren't constantly battling the big pharmas, they'll wilt away as their margins erode, since bringing generic drugs to market before the competition is the lifeblood of these companies. Being the largest generics producer, Teva is in a good position to continually pour resources into the legal challenges required in this high-stakes game.

Pfizer is an Inside Value pick. To see which other stocks have caught the attention of Philip Durell and his team of value-minded Fools, take a 30-day free trial of the newsletter. GlaxoSmithKline is an Income Investor selection.

Fool contributor Brian Lawler does not own shares of any company mentioned in this article. The Fool has a disclosure policy .