A picture of the Rio de Janeiro city councillor Marielle Franco outside the city-council chamber in Rio de Janeiro, Brazil, March 15, 2018. Thomson Reuters RIO DE JANEIRO (Reuters) - A popular Rio de Janeiro city councilwoman who was an outspoken critic of police killings of poor residents in shantytowns was gunned down in what police, prosecutors and even drug gang leaders said on Thursday looked like a political assassination.

Marielle Franco, 38, a rising star in the Socialism and Liberty Party (PSOL), was killed along with her driver in northern Rio around 9:30 p.m. Wednesday night. Her press secretary survived the shooting on Rio's dangerous north side.

The killing comes just weeks after the federal government decreed that Brazil's Army would take over all security operations through the end of the year in Rio, where murders have spiked in recent years. Franco had harshly criticized that move on Sunday, saying it could worsen police violence against residents.

"It is far too soon to say, but were are obviously looking at this as a murder in response to her political work, that is a main theory," said a Rio de Janeiro public prosecutor, who spoke on condition that he not be named as he was not authorized to discuss the case.

An investigator with Rio's police force also said that the prime motive appeared to be Franco's calling out police for allegedly killing innocents in their constant battles with drug gangs.

Franco, who was raised and lived in the Mare complex of slums, long one of Rio's more dangerous areas, received over 46,500 votes in the 2016 election. That total was only bested by four of 51 council members.

Mourners outside the city-council chamber ahead of the wake of Rio de Janeiro's city councillor Marielle Franco, 38, who was shot dead in Rio de Janeiro, Brazil, March 15, 2018. REUTERS/Pilar Olivares

On Sunday on her verified Facebook account, Franco decried what she alleged to be the police killing of two boys during a police raid in an area called Acari.

"We must scream out so that all know what is happening in Acari right now. Rio's police are terrorizing and violating those who live in Acari," Franco wrote. "This week two youth were killed and tossed into a ditch. Today, the police were in the street threatening those who live there. This has been going on forever and will only be worse with a military intervention."

Calls to the police unit assigned to the Acari area were not returned. In a Sunday statement to the O Dia newspaper, police confirmed they carried out an operation in the area, were fired upon by drug traffickers, returned fire but had no knowledge of any deaths.

Franco was raised and lived in Mare, a complex of slums where about 130,000 residents must contend with the presence of Rio's two most powerful gangs — the Red Command and the Pure Third Command, along with militias often made up of off duty or retired police and fireman, who are as feared as the gangs.

A masked police officer with a suspect in handcuffs next to Brazilian marines during a surprise operation in Kelson's slum in Rio de Janeiro, Brazil, February 20, 2018. AP Photo/Leo Correa

High-level members of both the Red Command and the Pure Third Command told Reuters their gangs had nothing to do with the killings. It was impossible to reach any militia members.

Raul Jungmann, who heads the federal government's newly created Public Security Ministry, said at an event in Sao Paulo that what Franco's killing was "a tragedy."

"Another lamentable daily tragedy that takes place in Rio de Janeiro. We must understand extremely well the reasons behind this and go after those responsible," he said. "But this does not put at risk the federal intervention."

Jungmann said that federal investigators would be involved in the investigation and that he had put Brazil's federal police at the disposition of local investigators.

Vigils and protests were planned in at least seven major cities across Brazil and about 150 members of the PSOL party carried flowers and signs into Brazil's federal Congress on Thursday demanding justice.

The United Nations office in Brazil and Amnesty International demanded a quick and transparent investigation into Franco's killing.

(By Brad Brooks; additional reporting by Pedro Fonseca in Rio de Janeiro, Eduardo Simoes in Sao Paulo and Anthony Boadle in Brasilia; editing by David Gregorio)