A federal judge in Delaware on Friday struck down key patents held by Acorda Therapeutics Inc related to its multiple sclerosis drug Ampyra, causing the stock to tumble 24 percent before trading was halted.

The ruling by U.S. District Judge Leonard Stark opens the door for generic versions of the drug by companies including Mylan Inc and Roxane Laboratories Inc.

Those companies had sought approval from the U.S. Food and Drug Administration to sell a generic version of Ampyra. Acorda responded by suing them, seeking a court declaration that its patents on the drugs were valid.

Sales of Ampyra, which is used to improve walking in MS patients, accounted for almost 90 percent of Ardsley, New York-based Acorda’s 2016 revenue of $519 million.

Stark invalidated four Acorda patents on methods of delivering the drug which were not set to expire until between 2025 and 2027. In a minor victory for Acorda, the judge upheld one patent on the extended-release formulation of Ampyra, which is set to expire in 2018.

Acorda Chief Executive Ron Cohen said in a statement the company is disappointed by the ruling and is preparing to appeal.

Ampyra is a type of drug called a potassium channel blocker and can be prescribed to multiple sclerosis patients however requirements differ from nation to nation.  In the United States Ampyra is prescribed based on the patient’s walking speed and other clinical criteria.

Multiple Sclerosis is characterized by damage to the protective coating called myelin that surrounds nerves on their surface.

In normal neural function potassium ions enable nerve electrical signal impulses to flow along nerve fibers.  When myelin is attacked the nerve fibers are exposed and potassium ions leak from the exposed areas interrupting the flow of the electrical impulses.

Ampyra blocks tiny pores, or potassium channels, on the surface of nerve fibers. Blocking potassium channels may improve the conduction of nerve signals in along nerve fibers whose insulating myelin coating has been damaged by MS. By blocking these potassium channels and improving the conduction of nerve impulses Ampyra increases the communication between damaged nerve cells and thus improves nerve function.

Many patients who take Ampyra state that there are improvements in other neurological functions other than ambulation (walking).

The company said it has developed contingency plans to address its business goals in the event Ampyra becomes available as a low-cost generic drug and will update investors when it finalizes a timeline for implementing those plans.

A total of ten drug companies have sought to sell generic versions of Ampyra. Acorda reached settlement agreements with seven of the generic companies, including Allergan plc and Par Pharmaceuticals. Mylan, Roxane Laboratories Inc and Teva Pharmaceutical Industries Ltd did not settle and challenged the validity of Acorda’s patents in court.