Nearly 1,000 police and federal agents tore through a town outside Mexico City (search), smashing gates and breaking down doors in a hunt for the leaders of a vigilante mob that burned two federal agents to death.

The killings have shocked and horrified Mexico, all the more so because they were captured by news cameras, then broadcast on all major networks. A young man, his face bloody and swollen, can be seen struggling to tell a television reporter that he is an undercover federal agent. Then a mob pours gasoline on him and a fellow officer and sets them ablaze.

The chilling images put a spotlight on growing vigilante justice in Mexico, where police are viewed as inept at best and corrupt at worst and where many people say they must take security into their own hands as crime soars.

With helicopters thundering overhead, a long convoy of government vehicles moved in on San Juan Ixtayopan around dusk Wednesday, bearing 600 members of the Mexican FBI and 300 municipal police officers.

They wore bulletproof vests and carried machine guns and huge shields. Within minutes, the forces had sealed off streets and were mounting a house-to-house search for the mob leaders.

The forces smashed through gates, broke down doors and blocked the entrances of businesses, focusing on the area near a church where Tuesday night's killings occurred.

About three hours later, authorities rolled out with 23 people in their custody, at least three of them suspected of organizing the mob and helping to carry out the attacks.

It all started with rumors that children had been kidnapped from an elementary school in San Juan Ixtayopan (search), a neighborhood of 35,000 people on Mexico City's southern outskirts. When people saw three men taking photos and staking out the school, they took action.

One after another, residents set off dozens of crude, rooftop bullhorn alarms that serve as a backup security measure in some poor districts. Neighbors poured into the streets, where they cornered and then beat the men. Onlookers cheered and shouted obscenities.

Reporters arrived, and the assailants pushed the victims before TV cameras so they could be interviewed. Barely conscious and struggling to talk, they nodded and gave one-word answers when asked if they were federal agents.

As television helicopters hovered overhead, police arrived. One agent was rescued, carried away unconscious by his arms and legs. He was in intensive care late Wednesday, authorities said.

The two other officers were soaked with gasoline and set ablaze, their charred bodies left in the street as dozens of people milled around.

The federal police director, Adm. Jose Luis Figueroa, said the three plainclothes agents were in the neighborhood to investigate drug dealing near the school.

Talk focused on the police themselves. Others said vigilante justice is to be expected in a country where police are infamous for seeking bribes and often implicated in the same crimes they are supposed to prevent.

There appeared to be little remorse in San Juan Ixtayopan, a picturesque community tucked into pine-covered hills at the foot of a snowcapped volcano.

Before Wednesday night's raid, people milled about in the central plaza, discussing the bloodshed. Vendors loudly hawked tabloid newspapers carrying photos of the victims and boldfaced headlines that screamed "LYNCHED."

Many people were reluctant to speak to reporters. Some denied being present during the beatings. Others said they stayed up through the night crying after trying unsuccessfully to stop the assault.

But some residents complained police had ignored reports of the kidnappings and said they did not regret what had happened.

"If the police aren't going to do anything, then the town has to take matters into their own hands," said 15-year-old Maria Eva Labana, who said she witnessed some of the attack firsthand before she ran home to watch the rest on TV.

Mexico City Police Chief Marcelo Ebrard said local police were on the scene immediately but couldn't control the crowd until hundreds of reinforcements arrived.

"The problem was that there were more than 2,000 people, angry, out of control, at night," he said.