Two Marine helicopters collided Wednesday at the Yuma Training Range Complex near the Arizona-California state line during a nighttime training exercise, killing seven Marines in one of the worst training accidents in recent years.

The helicopters that collided — an AH-1W “Cobra” and a UH-1Y “Huey” — were conducting routine training operations about 8 p.m. Wednesday in a remote area of the Yuma complex, the Marine Corps said in a statement Thursday. Both helicopters belonged to the 3rd Marine Aircraft Wing.

The 1.2-million-acre complex covers airspace and lands in southwestern Arizona and southeastern California, including the Chocolate Mountain Aerial Bombing and Gunnery Range in California. The Associated Press reported that the two helicopters crashed in the Chocolate Mountains on the California side of the line with Arizona.

Six of the Marines killed were from Camp Pendleton, Calif., and one was from Marine Corps Air Station Yuma. The names of the Marines were withheld pending notification of next of kin.

Two of those killed were aboard the Cobra, the Marines’ main attack helicopter, and the five others were on the Huey, a new version of the utility helicopter first used during the Vietnam War, the AP reported.

A number of other helicopters were involved in the training exercise, which was meant to prepare crew members for missions over the hot, dusty deserts and jagged mountains of Afghanistan.

Such training accidents are relatively rare. In July, a UH-1Y Huey crashed at Camp Pendleton, killing one Marine and injuring five others. At the time, Marine officials said the crash was believed to be the first one involving the UH-1Y since it joined the Marine Corps inventory in 2008.

Staff writer William Branigin in Washington contributed to this report.