A string of violent attacks against police in "pacified" Rio de Janeiro slums shows that Brazilian organized crime is not going down without a fight as the World Cup looms.

With the football extravaganza less than four months away, and despite aggressive efforts to clean up the favelas, violent crime remains a problem.

Launched in 2008, Rio's Police Pacification Units (UPP) have been tasked with wresting control of the city's crime-ridden slums from drug gangs.

The program has led to sharp falls in homicide rates in the favelas and across Rio as a whole.

However a spate of recent incidents suggests drug gangs are refusing to go quietly.

On February 2, a 28-year-old police officer Alda Castilhos was shot dead.

On Sunday, traffickers opened fire on police in Rio's largest favela, Rocinha, leaving two officers injured as they dived to take cover.

Rio state's interior minister, Jose Mariano Beltrame, has launched a counter-attack and told AFP he "will not shrink" as he cranks up a pacification process launched with the World Cup and 2016 Olympics in mind.

"We were never under any illusions that the ringleaders who have dominated the favelas for more than 30 years would give up easily," Beltrame said.

"But we must point out that in the past their criminal actions were a daily occurrence," added Beltrame in describing areas which for three decades were drug dealers' fiefdoms devoid of police presence.

He adds pacification is "an enormous challenge (which) is not progressing as quickly as we could wish."

Beltrame says the traffickers are fighting to hang onto ill-gotten gains but insists that "their attacks reinforce our determination to bring peace to the area."

To date, 36 UPP have been set up in 252 favelas home to 1.5 million people with total strength of more than 9,000 officers.

In six years, homicides in those slums have plunged 65 percent and 48 in Rio as a whole.

Some observers say the rise in recent violence can be put down to the presumed killing by police of Amarildo de Souza, a 47-year-old bricklayer and family man.

He disappeared in Rocinha last July 14 after being questioned at a UPP post over suspected drug trafficking.

"The implication of police torpedoed the credibility of the UPP project. What happened Sunday is a show of the criminals' strength," says public security specialist Paulo Storani.

"The traffickers are not fools. In the Amarildo affair they saw a moment of weakness regarding (slum) pacification," adds Jose Augusto Rodrigues, expert on urban violence at the University of Rio (Uerj).

'Blackmail'

"As they cannot reconquer lost territory they are doing what they did in 2010 in creating a climate of instability and insecurity," says Rodrigues.

"It's blackmail on their part to force the government to backtrack on pacification," says Rodrigues, seeing the new violence as a warning to police.

Weekly news magazine Epoca sees a political plot, however, in the form of a manoeuvre by a former state governor who would like to recapture the post in October elections.

Epoca this week published an exclusive spread entitled "The sabotage against the UPP."

The weekly accused the politician in question of indulging in "threats, spying and drawing up dossiers to discredit the policy of pacification".

Epoca says the politician has conspired with the former head of the civilian police, said to be close to hard right militias who control some favelas not in thrall to drugs traffickers.

The officer was handed a 28-year jail term in 2010 for protecting mafia-style groups running a slot machine racket, but remains at liberty pending a definitive sentence ruling.

Beltrame refused to comment on the issue but Rodrigues said for his part that "the Epoca investigation (appears) well-documented and very plausible."

Rodrigues adds that current Rio governor "Sergio Cabral lost popular support following (last June's) Confederations Cup.

"He has become very fragile and that exacerbates the situation."

Even so, Rodrigues believes the UPP are there to stay as the process is "irreversible."

He explains: "Nobody has the political means to end it -- the whole population is behind it."