TRENTON, N.J. - India's largest maker of generic drugs won approval late Wednesday to sell a generic version of cholesterol blockbuster Lipitor. The world's top-selling drug ever lost U.S. patent protection earlier in the day.

The U.S. Food and Drug Administration said it granted Ranbaxy Laboratories Ltd. approval to sell a generic verson of Pfizer Inc.'s Lipitor, called atorvastatin calcium. The last-minute decision ended widespread speculation over the outcome of a delay caused by long-standing manufacturing issues at some Ranbaxy factories.

Analysts, pharmacists and others had been watching closely to see whether Ranbaxy would be able to get its generic on the market by the time the patent expired for Lipitor.

That's because quality problems at some Ranbaxy factories, dating to 2006, had led the FDA to block shipments of many of its generic drugs to this country and to hold up approval of any new Ranbaxy drugs.

According to FDA spokeswoman Sandy Walsh, Ranbaxy will be manufacturing the pills under a partnership with Ohm Laboratories in Ohm's New Jersey facility.

With billions of dollars in annual U.S. sales of Lipitor at stake, the largest-ever switch from a brand name to generic drug has been arguably the biggest event this year in the pharmaceutical industry.

Lipitor had peak sales of $13 billion and still brings in nearly $11 billion for New York-based Pfizer, roughly two-thirds of that from U.S. sales. The U.S. revenue will start declining right away, and will plummet with the advent of more generic versions next June.

Ranbaxy did not immediately say when it would start shipping its generic Lipitor.

Two generic versions, priced about 30 per cent to 50 per cent less than Lipitor, originally had been expected to hit pharmacies starting Wednesday, offering some savings to the 3 million Americans taking the cholesterol-lowering pill.

Watson Pharmaceuticals Inc. began distributing one, an authorized generic, Wednesday under Watson's brand. Under Watson's deal with Pfizer, Pfizer will receive an estimated 70 per cent of those sales.

At least three additional generic versions are expected to hit the market starting on June 1. Then the price for all the generics should plummet to about 20 per cent of Lipitor's current price, about $115 to $160 per month, depending on dosage.

But Ranbaxy's manufacturing issues and an unprecedented scheme by Lipitor's maker, Pfizer Inc., upended what normally happens when a blockbuster drug's patent expires.

Amid repeated inquiries from journalists and others about the pending approval, Ranbaxy refused to comment. The FDA, per its standard procedure, stayed mum until the approval was official.

Ranbaxy now has permission to sell atorvastatin tablets in 10, 20, 40 and 80 milligram strengths, the same as for brand-name Lipitor.

Rumours had been floating over the past week that Ranbaxy was close to a financial settlement with the FDA that would include approval to sell generic Lipitor. The FDA has been under the gun because patients, insurers and consumer advocates wanted widespread generic competition on time.

"This medication is widely used by people who must manage their high cholesterol over time, so it is important to have affordable treatment options," Dr. Janet Woodcock, director of the FDA's Center for Drug Evaluation and Research, said in a statement. "We are working very hard to get generic drugs to people as soon as the law will allow."

In September 2008, the FDA blocked imports of more than 30 Ranbaxy generic drugs, including two older generic cholesterol drugs, because of poor quality in two Ranbaxy factories. The FDA said that it had found problems that could result in contamination and allergic reactions, and that the company had not corrected them.

Meanwhile, Pfizer, which gets about one-sixth of its revenue from Lipitor, has started a strategy to retain as much revenue from Lipitor as possible, at least until next June. It is subsidizing both patients and insurers to keep their costs at or below generic prices -- if patients stay on brand-name Lipitor for the next six months.

Atorvastatin is a statin, a type of drug that lowers bad cholesterol and blood fats called triglycerides by blocking an enzyme in the liver. Along with a low-fat diet, the drug lowers the risk for heart attack, stroke, chest pain and some types of heart surgery. It can also raise levels of good choloesterol.

In Pfizer's clinical tests of Lipitor, the most common side effects were nasal inflammation, joint pain, diarrhea and urinary tract infections.