A police officer was slain while on foot patrol in Brazil's largest slum, military police said Friday.

Diego Bruno Barbosa Henriques was shot and killed overnight Thursday as he and three fellow officers patrolled Rio de Janeiro's sprawling Rocinha slum.

An operation was under way to apprehend Henriques' assailants, and G1, the internet portal of the Globo television network, reported one suspect had been detained. The suspect was carrying a 9-millimeter pistol, the same weapon used against Henriques, the report said.

The body Henriques, who had been on the force for about a year, was buried later Friday.

Police and soldiers took over Rocinha in November as part of a large-scale program to restore the rule of law in Rio slums long under the control of heavily armed drug gangs and largely off-limits to authorities.

The government's reasserted control over the shantytown is seen as strategic as Rio prepares to host the 2014 soccer World Cup and 2016 Olympics. Rocinha is on the road that links the main Olympic village with other event sites inside the city proper.

In a Twitter post, Rio state Gov. Sergio Cabral called Friday's slaying "a desperate action" and pledged that "there will be no backsliding in pacified communities.

"The difference is that until two years ago, the police was the invader. Now, the bandits are the invaders," Cabral's post read. "Peace is our objective for all the areas of our state."

Another police officer was shot and killed in Rocinha in April.