WASHINGTON, June 24 (Reuters) - The U.S. Supreme Court gave boost on Monday to a challenge by 21 pharmaceutical and medical equipment companies led by AstraZeneca to a lawsuit accusing them of illegally helping to fund terrorism that killed or injured hundreds of American troops and civilians in Iraq.

The justices threw out a lower court's ruling that revived a lawsuit brought by the military personnel and civilians who said they were harmed between 2005 and 2011 in the Iraq war. The justices asked the lower court to reconsider the case.

Hundreds of American service members and civilians, and their families, sued the defendant companies, part of five corporate families - AstraZeneca, Pfizer, GE Healthcare USA, Johnson & Johnson and F. Hoffmann-La Roche.

The plaintiffs accused major U.S. and European pharmaceutical and device makers of providing corrupt payments to the Hezbollah-sponsored militia group Jaysh al-Mahdi in order to obtain medical supply contracts from Iraq's health ministry. The plaintiffs alleged the militia group controlled the health ministry.

The lawsuit, brought in 2017 in federal court in Washington, seeks unspecified damages under the Anti-Terrorism Act, a federal law that allows Americans to pursue claims related to "an act of international terrorism."

A federal trial judge in 2020 dismissed the lawsuit, but the U.S. Court of Appeals for the District of Columbia Circuit in 2022 overturned that decision and let the case move ahead.

The companies have denied wrongdoing and said they "are not responsible in any way for the tragic events that were caused and carried out by Iraqi militia groups."

The companies said in a filing to the justices that a 2023 Supreme Court ruling shielding social media platform Twitter, now called X, from liability under the federal Anti-Terrorism Act should bar the claims in this case.

In the Twitter case, the Supreme Court determining that aiding-and-abetting claims under the Anti-Terrorism Act require showing that a defendant "consciously and culpably" participated in a terror act to help it succeed.

The plaintiffs countered in a filing that those who sued Twitter had sought to hold that company liable for "mere inaction" - the alleged failure to exclude a terrorism group from the platform.

The pharmaceutical and device makers' "knowing bribes to terrorists were far more culpable," the plaintiffs said.

(Reporting by Mike Scarcella; Editing by Will Dunham)