ALBANY, N.Y. (AP) -- A federal judge has ordered an Irish drug manufacturer to halt its plans to discontinue its widely used Alzheimer's medication, allegedly in an effort to drive patients to a newer patented drug.

Chris Gallagher, Getty Images

U.S. District Judge Robert Sweet tells Dublin-based Actavis PLC to continue making the drug Namenda available through July, when generic alternatives become available.

The company says it will appeal Monday's ruling.

New York Attorney General Eric Schneiderman sought the court order. He alleges Actavis and New York subsidiary Forest Laboratories violated anti-trust and state laws in an effort to avoid losses from cheaper generic alternatives coming out next year.

Actavis has said its new drug Namenda XR - taken once daily instead of twice - is better and demand is growing.

(© 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed)