The slain agents had gone to the airport "to detain suspects linked to drug trafficking at Terminal 2," the federal Public Safety Department said in a statement, without specifying if the suspects also were lawmen. "Upon seeing themselves surrounded by federal police, they (the suspects) opened fire on the officers."
Two officers died at the scene and another died later of his wounds at a local hospital.
A witness said the shooters were also wearing police uniforms, and the Public Safety Department said it was investigating whether the shooters were active-duty police, former officers or impostors. Criminals in Mexico sometimes wear fake police uniforms, but officials also have repeatedly struggled to crush corruption among law enforcement agencies at the airport, which traffickers have often used as a shipment point for narcotics.
No suspects had been arrested following the shooting, which took place shortly before 9 a.m. (10 a.m. EDT; 1400 GMT).
The shootings occurred around the food court at Terminal 2, near the area where vehicles drop off passengers but well outside the internal security checkpoints where workers and passengers are screened.
Three shots rang out at first, said witness Israel Lopez, a 23-year-old Mexico City student who had gone to the airport to see off a friend. Lopez didn't see who those shots were directed at, but then the gunfire came closer.
"We were in the food court, and some policemen came in and started shooting at another policeman who was on the floor," Lopez said.
"We dove to the floor and covered ourselves with chairs," Lopez said.
Lopez said the shooters wore blue uniforms like those worn by the federal police who provide security at the airport. He said the shooters then ran to the car park area "as if they were pursuing somebody," and he lost sight of them.
The airport said in a press statement that the terminal and flights were operating normally following what it described as "a dispute in an open-access area."
Officials have said that Mexico City's airport is used by traffickers to move drugs, money and illegal migrants. Federal police said they seized 198 pounds (90 kilograms) of cocaine at the airport in 2011 and 440 pounds (200 kilograms).
Guadalupe Perez, 27, went to the airport to interview for a job when she saw the body of one of the officers on the floor. "It scared me a lot to see something like that, a body," she said.
Robert Gray, an evangelical missionary from Hart, Michigan, arrived at the airport after the shooting with his family to catch a flight.
"It's surprising to see it happening at the airport. It's one of the safest places in the city," Gray said.
Shootings at Mexican airports are rare. In 1993 Roman Catholic Cardinal Juan Posadas Ocampo was killed in an airport parking lot in central Mexico. Authorities later said his killers had apparently mistaken his car for that of a rival drug lord.
(Copyright 2012 by The Associated Press. All Rights Reserved.)