RIO DE JANEIRO (Reuters) - Atop the chipped blue metal table sat two 9 mm pistols and small plastic packets of cocaine and marijuana. Two young men slouched in white plastic chairs, while a third held a rifle in a corner 10 meters away.

A general view of the Rocinha favela, one of the slums that was included in the "police pacification unit" program that began in 2008, in Rio de Janeiro, Brazil, July 24, 2016. REUTERS/Bruno Kelly

It was midday this week, not far from a main road in Rocinha, Rio de Janeiro’s most developed and supposedly “pacified” slum that straddles a mountain and sits right between the main Barra and Copacabana Olympic zones.

A uniformed police officer stood just 150 meters away, up a sinuous, narrow asphalted lane.

How long had the gang members returned to openly carrying weapons in Rocinha, where 3,000 police and armored personnel carriers in late 2011 invaded to drive out traffickers?

“If you are not buying, move along,” was the terse response from one man at the table, who appeared to be in his late teens.

The scene was emblematic of problems plaguing the stagnated “police pacification unit” program, or UPP, which started in 2008. Its ambitious goal: to push heavily armed gangs from slums and construct permanent police outposts.

There were early successes but they have faded with murder rates again on the rise. A lack of serious follow-up investments because of exhausted public finances and insufficient political will now threatens the entire program.

While most residents are pleased the gangs have less of a presence than before the program began, they also expected to see improved schools, health clinics and sewage systems.

Rio’s city government says it has spent $1.8 billion reais ($560 million) on social programs since 2011. But with so much need for the roughly 20 percent of Rio’s population that lives in slums, frustration over what residents see as a lack of progress has exacerbated tensions with heavily armed police.

“People around here are more afraid of the police than we ever were of the drug gang,” said Alex de Mello, a fishmonger who has lived 24 years in Rocinha. “At least with the gangs, if you minded your business you probably would be left alone.”

To date, 38 police pacification units have been created, putting over 9,500 police into the shantytowns, or “favelas”, where 1.5 million people live, according to Rio’s state government.

The effort was meant bring security ahead of the Olympics and the 2014 World Cup soccer tournament, with the promised legacy of delivering basic social services to the favelas.

Authorities openly stated the effort could not end the drug trade, but sought to at least disarm it. For several years, drugs continued to be sold out of “pacified” areas but without the obvious presence of weapons. That has changed.

Slideshow ( 6 images )

For the first five years, the program was a smash success on the security front. By 2012, murders in Rio and the surrounding Baixada Fluminense area had plummeted 40 percent from the 2008 level of 3,856 killed.

“Then we had the Rocinha effect,” said Robert Muggah, research director at the Rio-based Igarape Institute, a security and development think tank. “Pushback against the program began in 2013 and reached a crescendo with the killing of Amarildo.”

A 42-year-old construction worker who lived in Rocinha, Amarildo Souza was abducted, tortured and “disappeared” by pacification police in July 2013.

They falsely claimed he had ties to gangs. His body has never been found.

Twelve officers were found guilty in his case, with the former commander of Rocinha’s UPP unit sentenced in February to over 13 years in prison.

Souza’s death followed years of complaints of heavy-handed policing, and was the final straw for residents fed up that the promised social services never appeared.

Several subsequent episodes of police killing innocents, including children, and officers caught colluding with drug gangs have made things even worse. Add an ongoing recession, and public and institutional support for new UPPs waned.

The last unit created was inaugurated in May 2014 - since then, nothing.

MORE MURDERS

Five years after the pacification programs began, homicides suddenly spiked again. Killings in 2013 returned to the pre-UPP level, with 3,879 murders in Rio and Baixada Fluminense as emboldened gangs carried out brazen attacks on police.

The killings dipped again for the following two years, but climbed 7.5 percent to 1,518 murders in the first six months of this year compared to the same period in 2015.

As worrying, the number of people killed by police has jumped 12 percent in that same time frame. They spiked 62 percent in May and June with 127 people killed by officers - mostly young, black and poor men.

Rio’s outspoken Mayor Eduardo Paes has bashed state officials on the security front, saying they have done a terrible job.

The state’s security chief Jose Beltrame loudly laments the fiscal crisis, openly questioning how he can adequately protect the population when his 2016 budget was slashed by 30 percent.

Rio state, which oversees security forces, is the second most indebted in Brazil. The interim governor declared a “state of calamity” in June to secure enough federal funds to pay police and keep hospitals open this year.

Renata Neder, a Rio-based human rights advisor with Amnesty International, blamed the Olympics for the increase in police violence because of more frequent slum raids.

“You increase the number of operations then you increase the number of people being killed,” she said. “The security for the Games is resulting in rights violations.”

Rio’s state security secretariat said in an emailed statement that “the UPPs are not going to end” and that a state decree from 2015 enshrining the pacification policy was a guarantee the effort could not stop when new governments are elected.

Shantytown residents are not so sure.

A survey released last month by the Getulio Vargas Foundation think tank found that over 43 percent of slum residents think the pacification program “will end” after the Olympics, while slightly over 41 percent think it will continue.

The survey questioned 2,000 people in 20 different slums.

Although gang members sell drugs and carry weapons, they still have much less of a presence than before the pacification programs were implemented.

Jeruza Lima, a 28-year-old born and raised in Rocinha who runs a tiny snack food store, said she thinks the UPP improved life in the community and she hopes the policing effort continues for long after the Olympics end on Aug. 21.

“You no longer see the gangs walking around heavily armed, setting the rules of how we live our life,” she said.

“For me, Rocinha is a better place now with the police here. They can’t go away – can they?”