Ulcer sufferers will soon be able to buy a generic version of the world's most popular ulcer medication.

The Food and Drug Administration said it would allow Novopharm USA Inc. to market its generic version of Zantac, developed and sold for years by Glaxo Wellcome, Novopharm said Monday.

The FDA approval followed an agreement between Novopharm and another company on marketing of a generic form of ranitidine hydrochloride, the drug's active ingredient.

Under a licensing deal negotiated in April with Glaxo, Novopharm won permission to start selling a generic form of the drug on July 10.

But the FDA upset Novopharm's plans when it decided in June that Genpharm Pharmaceuticals of Canada had won the exclusive right to the market through Aug. 29.

And, because of the company's patent litigation with Glaxo Wellcome, Genpharm could not manufacture the drug. Novopharm challenged the exclusivity ruling in court.

``The U.S. courts have tied our hands in this matter, and we had to come up with a way to make good on our promise to bring consumers relief at the pharmacy counter on the cost of Zantac,'' said Robert Gunter, Novopharm USA president.

Under the agreement between the two pharmaceutical companies, Novopharm _ which has fought for years for the right to make a cheaper, generic version of Glaxo's drug _ will be the sole distributor of generic Zantac in the United States.

Genpharm agreed to waive all its exclusivity right to sell ranitidine to Novopharm until Aug. 29. If the FDA or the courts extend Genpharm's exclusivity, Novopharm would be awarded the additional time. And Genpharm can waive its exclusivity to Novopharm only.

Gunter said Novopharm signed an agreement with Genpharm ``so there could be a generic version available immediately _ to do anything else would have been a complete travesty after all we have endured over the last six years to bring this product to the pharmacy shelves.''

On July 3, a federal court in North Carolina ruled that the FDA must grant Novopharm final approval on its application for generic Zantac and allow the company to begin marketing the product on July 10.

Just seven hours before Novopharm was to begin doing that, the Fourth U.S. Circuit Court of Appeals in Richmond issued a stay, blocking the FDA from granting Novopharm final approval.

Novopharm also lost in an emergency session of the court. A hearing is scheduled for the week of Sept. 29.

Zantac produced sales of $2.4 billion in 1996.

Novopharm USA is a division of Novopharm Ltd. of Scarborough, Ontario. It employs more than 3,000 people worldwide.