Three armed robbers pulled a couple from a stopped car, beat the woman and shot the man as they waited early Monday for a train to pass, Atlanta police said.

With the crossing arm down, John Osses and Zoa Hepburn were sitting at the railroad crossing at McDaniel and Bass streets in southwest Atlanta’s Pittsburgh community about 2 a.m., police said.

As warning lights flashed and bells rang, three men, all in black and armed with pistols, approached the stopped car, police said.

They forced the couple out the vehicle, beat Hepburn in her head with a pistol and shot Osses once in the right arm, police spokeswoman Kim Jones told The Atlanta Journal-Constitution.

The suspects then apparently took the keys to the maroon Volkswagen Passat Hepburn was driving and drove away in a different dark-colored vehicle, Jones said.

Osses flagged down officers after the incident about 2:20 a.m. at Ralph David Abernathy Boulevard and McDaniel Street.

“Money, credit cards, personal effects,” Atlanta police Maj. Lane Hagin told Channel 2 Action News. “Doesn’t appear they were targeting anything. More of a crime of opportunity with them stuck at the railroad tracks.”

Osses and Hepburn were taken to Grady Memorial Hospital for treatment. They are expected to be OK, according to Channel 2.