Hundreds of military service members and contractor employees have fallen ill with cancer or severe breathing problems after serving in Iraq and Afghanistan, and they say they were poisoned by thick, black smoke produced by the burning of tons of trash generated on U.S. bases.

In a lawsuit in federal court in Maryland, 241 people from 42 states are suing Houston-based contractor Kellogg Brown & Root, which has operated more than two dozen so-called burn pits in the two countries. The burn pits were used to dispose of plastic water bottles, Styrofoam food containers, mangled bits of metal, paint, solvent, medical waste, even dead animals. The garbage was tossed in, doused with fuel and set on fire.

The military personnel and civilian workers say they inhaled a toxic haze from the pits that caused severe illnesses. Six with leukemia have died, and five are being treated for the disease, a cancer of the blood and bone marrow. At night, more than a dozen rely on machines to help them breathe or to monitor their breathing; others use inhalers.

"You'd cough up black stuff, and you couldn't seem to catch your breath. And your eyes were burning," said Anthony Roles, 33, a father and Air Force retiree from Little Rock, who was told that he had a blood disorder shortly after returning from Iraq in 2004. "I can still smell it to this very day."

Roles said there was a nickname for the symptoms: "Iraqi crud."

Whether the plaintiffs, who include current and former service members and KBR employees, can prove in court that open-air trash burning made them sick -- or that KBR bears any responsibility -- hinges on complex legal and medical issues. There is no guarantee that the courts will allow their cases to be brought to trial. But the lawsuit caught the attention of Congress and led to government limits on burn pits.

In March, the military banned most open-air burning of plastics, tires, aerosol cans and other materials. In April, the Department of Veterans Affairs identified burn pits as an environmental hazard. Last month, the American Lung Association, citing health risks to soldiers, urged the military to immediately find other means of trash disposal.

"It's tragic when soldiers come back and didn't get a scratch on them from the enemy but have some possibly life-altering problems because of burn pits," said Rep. Carol Shea-Porter (D-N.H.), one of several lawmakers who pushed to limit the use of the pits.

KBR officials said the military decides when to use open-air burning, where to set up the pits and what to toss in. They pointed to a 2008 military study of the burn pit at Balad Air Base. That study, widely used to gauge health risks of burn pits in general, concluded that there were no long-term effects.

"We have asked the Army whether they still believed it was okay for us to provide services to burn pits, and also be at burn pits, and that's because we wanted to make sure our people were adequately protected," said Jill Pettibone, a KBR senior vice president. "We were assured it was."

Until 2007, KBR was an engineering and construction subsidiary of Halliburton, an oil field services company, which is a defendant in the lawsuit.

R. Craig Postlewaite, acting director of the Defense Department's Force Health Protection and Readiness Programs, said in court papers that the military acknowledges that it is "plausible and even likely that a relatively small number of people. . . may be affected by more serious, longer term health effects." A Defense Department spokeswoman said that the government is studying the exposures and that "our number one priority is the health of service members."