Twenty-two Marines were treated for exposure to halon Thursday afternoon when a fire extinguisher system inadvertently discharged aboard an amphibious assault vehicle at a California base.

An equipment malfunction caused the fire suppression system to go off inside the tank-like vehicle during a training exercise at the Marine Corps Air Ground Combat Center in Twentynine Palms, base spokesman Dave Marks said.

Marks said there was no fire or explosion, but 22 Marines were taken to the base hospital. All but three were later released to resume training, while the others were kept overnight for observation.

Halon gas is widely used in fire extinguisher systems because it is relatively nontoxic and leaves no residue, but it can cause breathing problems at high concentrations. The U.S. banned new production of halon in the 1990s because it can deplete ozone in the atmosphere, but its use is still allowed.

The Marines were from the 2nd Battalion, 3rd Marine Regiment, based in Hawaii and were participating in an integrated training exercise at the Southern California base, according to the Marine Corps.

Twentynine Palms, 130 miles east of Los Angeles, is the largest Marine training base in the world. Thousands of Marines take part in live-fire drills in rugged terrain deep in the Mojave desert.

"Ninety percent of the Marines will cycle through here for their combined-arms training," Marks said.

In January, two Marine pilots, Capt. Elizabeth Kealey and 1st Lt. Adam Satterfield, were killed when their helicopter crashed during a training exercise at the base. The cause of the crash is under investigation.

The Associated Press contributed to this report.