Chicago Mayor Rahm Emanuel, who also spoke at the news conference, said the city had lost "two young men, both fathers with young families."
"There are no words that can express the grief, the sense of loss. It just knocks you back on your heels," he said.
Chicago police use "ShotSpotter" technology, or sensors that monitor for the sound of gunfire and alert police. Johnson said the two officers went to the scene Monday after a "ShotSpotter" alert went out.
"It just highlights again how dangerous this job can be. I often say that the most dangerous thing a police officer can do is take a weapon off of an armed individual," Johnson said.
The train that struck the officers was operated by a commuter rail line that links northern Indiana and Chicago, according to media reports.
In 2002, Chicago police officer Benjamin Perez was fatally struck by a commuter train while conducting surveillance on narcotics activity on the city's West Side.
Two other Chicago officers besides Marmolejo and Gary were killed in the line of duty this year.
Officer Samuel Jimenez was killed in a shootout last month after he chased a gunman inside a hospital on Chicago's South Side. The shooter also killed two other people — his ex-fiancee who was an emergency room doctor and a pharmacy resident — before taking his own life.
And in February, Cmdr. Paul Bauer was fatally shot while pursuing a suspect in the Loop business district.
"I think it's really important that we put our arms around the Chicago Police Department and hold them up and support them at this critical juncture, because we are so dependent on their professionalism and their sense of duty," Emanuel said Monday night.
- AP