Teva Pharmaceutical (NASDAQ:TEVA) is getting a taste of its own medicine. The generic-drug maker, which also makes branded drugs, including multiple sclerosis drug Copaxone, has some generic competition headed its way.

Mylan (NYSE:MYL) announced yesterday that it had signed an agreement with India-based NATCO Pharma to market NATCO's generic version of Copaxone. Mylan will have the rights to market the drug in the United States and all major markets in Europe, Australia, New Zealand, Japan, and Canada, with the possibility of expanding into other markets. NATCO currently sells the drug in India and the Ukraine.

Teva's U.S. patents on Copaxone extend until 2014, so it's not clear exactly why Mylan made the licensing deal now. Since the terms of the deal weren't disclosed, it's likely that the deal didn't cost Mylan much upfront and that the bulk of the payments to NATCO will be due at launch or in the form of royalty payments (or both).

Mylan has basically two options at this point. It could claim that Teva's patents are invalid, which means it would likely not be able to launch until 2011 at the earliest, while the patent lawsuits play out in court. Or it could just wait until 2014 to launch the drug. Since Copaxone is a highly complex drug, it's possible that Mylan isn't planning on challenging the patents, but just wants to submit the application early enough to gain approval by 2014. Momenta Pharmaceuticals (NASDAQ:MNTA) and Novartis (NYSE:NVS) submitted their marketing application for their generic version of Sanofi-Aventis' (NYSE:SNY) Lovenox -- another complex drug -- almost three years ago and still don't have a final approval.

Whenever Mylan launches the generic version, there's definitely plenty of money to be made from the knockoff version. Sales of Copaxone, which Teva markets by itself in U.S. and Canada, but co-markets with Sanofi elsewhere, were $1.7 billion last year and are on pace to top $2 billion this year.

This is a deal that Mylan probably couldn't have made a few years ago. Its major acquisitions of Matrix and Merck KGaA's generic-drug business have it drowning in debt right now, but Mylan's larger global reach is starting to pay off.

Related Foolishness: