A man scrawling graffiti inside a downtown subway station pulled out a gun and began shooting when confronted by police on Friday, killing at least two people and wounding five before being shot and subdued by officers.
Mexico City Attorney General Miguel Angel Mancera said a passenger and a police officer were killed at the Balderas subway station, near the Ciudadela crafts market. He said six people, including the shooter, were wounded.
Mancera identified the gunman as Luis Felipe Hernandez Castillo, 38, and said he was arrested carrying a .38-caliber revolver. The gunman was writing on the station walls with a black marker when a police officer confronted him, Mancera said. He said the man fatally shot the officer and a civilian who tried to stop him, and then ran to a subway car where he reloaded his gun and kept firing until other police officers shot him and captured him.
"He was out of his mind," Mancera said.
One witness, Mauricio Perez, said a subway train had just rolled into the station when gunfire broke out.
Perez said that while the gunman was firing his pistol he yelled that the attack was against the government.
"The shooting began right after the train got to the station ... this man began yelling: 'I have nothing against you, this is against the government,"' Perez said.
Police chief Manuel Mondragon announced that 1,000 more police officers would be assigned to the subway system and that passengers would be randomly checked.
The Mexican government is locked in a bloody conflict with feuding drug cartels, but shooting rampages like the one on Friday are relatively rare in Mexico.
Millions of commuters ride the capital's Metro trains each day. Balderas station is a major transfer point between subway lines.